2
我想使用jQuery file uploader,並遵循此sample [在Asp.Net中使用blueimp jQuery文件上傳控件的完整代碼示例]。錯誤ashx無法在jquery-file-upload中創建類型'jQueryUploadTest.Thumbnail'?
我複製了CSS,JS,圖像和* .ashx的文件到我的項目,但是當我跑步時,我卻收到以下錯誤
無法創建類型「jQueryUploadTest.Thumbnail 「在Thumbnail.ashx 文件
這裏是ASHX代碼:
<%@ WebHandler Language="C#" CodeBehind="Thumbnail.ashx.cs" Class="jQueryUploadTest.Thumbnail" %>
和Thumbnail.ashx.cs代碼:
using System.Web;
namespace jQueryUploadTest {
public class Thumbnail : IHttpHandler {
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "image/jpg";
context.Response.WriteFile(context.Server.MapPath("~/JQueryFileUpload/images/default_thumb.jpg"));
}
public bool IsReusable { get { return false; } }
}
}
此外,我得到'FileTransferHandler.ashx'相同的錯誤。
因爲<%@ WebHandler%>沒有attr codeFile。 –