Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this 开发者_如何转开发questionI am having an update panel and I need to go for a fileUpload control. Well, as the normal fileupload doesn't work properly with the update panel I thought of going for an ansynchronous file uploader control from the AJAX toolkit. But I am not very good at AJAX.
The event you need to worry about is the "OnClientUploadComplete" event. In that event you can save your file.
Remember that for an Ajax control, you have to add your Ajax Script Manager to the top of the page.
And if you have an ajax script manager, you dont need to add (and i think you can't add) more script managers. this includes the regular script manager, you dont need to add that.
Look at this... http://asp.net-informations.com/ajax/ajax-AsyncFileUpload.htm
Edit: Coding part will work the same as a Normal Fileupload control. Like...
if(FileUpload1.HasFile)
{
FileUpload1.SaveAs(Server.MapPath("~/AppFolderName/" + FileUpload1.FileName));
}
精彩评论