Dies ist ein Video-Tutorial, wie Sie mit C# und Webforms beginnen, sollte Ihnen helfen.
http://casonclagg.com/articles/6/video-tutorial-uploadify-asp-net-c-sharp.aspx
Können Sie Ihren Code schreiben, obwohl, so dass ich in der Lage sein könnte, um Ihnen zu zeigen, was man falsch machen? Hier
ist der Beispielcode ich für asp.net haben
<script type="text/javascript">
// <![CDATA[
var id = "55";
var theString = "asdf";
$(document).ready(function() {
$('#fileInput').uploadify({
'uploader': 'uploadify/uploadify.swf',
'script': 'Upload.ashx',
'scriptData': { 'id': id, 'foo': theString},
'cancelImg': 'uploadify/cancel.png',
'auto': true,
'multi': true,
'fileDesc': 'Image Files',
'fileExt': '*.jpg;*.png;*.gif;*.bmp;*.jpeg',
'queueSizeLimit': 90,
'sizeLimit': 4000000,
'buttonText': 'Choose Images',
'folder': '/uploads',
'onAllComplete': function(event, queueID, fileObj, response, data) {
}
});
});
// ]]></script>
<input id="fileInput" name="fileInput" type="file" />
Dann Sie einen Handler (.ashx) machen wollen:
public class Upload : IHttpHandler, IRequiresSessionState
{
public void ProcessRequest(HttpContext context)
{
try
{
HttpPostedFile file= context.Request.Files["Filedata"];
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");
}
}
}
Post Code und ich werde einen Blick daran. Klingt so, als würden Sie auf eine Ressource zeigen, die nicht existiert. Vielleicht ist Ihre "Uploader" -Eigenschaft nicht auf die richtige Ressource oder Ihr Jquery Link ist defekt (oder nicht dort).
Was ist uploadify? Was sind die Probleme, die Sie haben? Hast du einen eigenen Beispielcode, den du ausprobiert hast? –
jQuery Plugin, denke ich ... – hunter
Uploadify ist großartig. @JoelMartinez: http://www.uploadify.com/ –