我有一个Web窗体应用程序,并正尝试使用uploadify jQuery库ASP.NET - Uploadify在IE中,而不是在FF(AUTH饼干
它工作正常在IE8,但是在FF7没有。 ,FF10或FF3。我放入Upload.ashx的中断点没有命中
我做了相当的搜索,发现它与cookie有关,比如ASPXAUTH,我试图将它添加到'scriptData' ,但没有成功
任何想法
页代码:?
<script type="text/javascript">
$(document).ready(function() {
alert($(".hidcook").val());
// <![CDATA[
var id = "55";
var theString = "asdf";
$('#fileInput').uploadify({
'uploader': 'uploadify/uploadify.swf',
'script': 'Upload.ashx',
'scriptData': { 'id': id, 'foo': theString },
'cancelImg': 'uploadify/cancel.png',
'auto': true,
'multi': true,
'fileDesc': 'All Files',
'queueSizeLimit': 90,
'buttonText': 'Importar Planilha',
'folder': '/uploads',
'onAllComplete': function (event, queueID, fileObj, response, data) {
}
});
});
// ]]></script>
Upload.ashx:
public class Upload : IHttpHandler, IRequiresSessionState{
public void ProcessRequest(HttpContext context)
{
try
{
HttpPostedFile file = context.Request.Files["Filedata"]; //breakpoint
int id = (Int32.Parse(context.Request["id"]));
string foo = context.Request["foo"];
file.SaveAs("C:\\" + id.ToString() + foo + file.FileName);
context.Response.Write("1");
}
catch (Exception ex)
{
context.Response.Write("0");
}
}
试试// <![CDATA [out – Mantisimo 2012-03-21 16:54:59
]已评论。无论如何,不起作用。 – 2012-03-21 17:09:29