Uploadify not working with ASP.NET WebForms
Posted
by João Guilherme
on Stack Overflow
See other posts from Stack Overflow
or by João Guilherme
Published on 2010-03-04T15:28:39Z
Indexed on
2010/05/04
20:28 UTC
Read the original article
Hit count: 626
Hi ! I'm trying to use Uploadify in a ASP.NET webforms project. The problem is that my script is not calling the generic handler. Here is the script.
<input id="fileInput" name="fileInput" type="file" /> <script type="text/javascript"> $(document).ready(function() { $('#fileInput').uploadify({ 'uploader': '/Ferramenta/Comum/Uploadify/uploadify.swf', 'script': 'UploadTest.ashx', 'cancelImg': '/Ferramenta/Comum/Uploadify/cancel.png', 'folder': "/Ferramenta/Geral/", 'auto': true, 'onError': function(event, queueID, fileObj, errorObj) { alert('error'); }, 'onComplete': function(event, queueID, fileObj, response, data) { alert('complete'); }, 'buttonText' : 'Buscar Arquivos' }); }); </script>
This is the code of the generic handler (just to test)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.IO;
namespace Tree.Ferramenta.Geral
{
public class UploadTest : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.Write("1");
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
Any ideas ? Thanks !
© Stack Overflow or respective owner