Question

I want to use the jQuery file uploader , and followed this sample[Complete code example using blueimp jQuery file upload control in Asp.Net.] .

I copied the css ,js , image and the *.ashx file into my project, but when I'm running that, I'm receiving following error

could not create type 'jQueryUploadTest.Thumbnail' in Thumbnail.ashx file

Here is the ASHX code:

<%@ WebHandler Language="C#" CodeBehind="Thumbnail.ashx.cs" Class="jQueryUploadTest.Thumbnail" %>

and the Thumbnail.ashx.cs code:

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; } }
    }
}

Also I'm getting same error for 'FileTransferHandler.ashx'.

Was it helpful?

Solution

i copied the ashx.cs files to app-code directory.
everythings it's ok.[solved]

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top