开发者

Ajax FileUploader [closed]

开发者 https://www.devze.com 2023-03-04 00:14 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this
Closed. This question needs to be more focused. It is not currently accepting answers.

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 开发者_如何转开发question

I 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));
}
0

精彩评论

暂无评论...
验证码 换一张
取 消