omplete"
ThrobberID="loader"/>
<asp:Image ID="loader" runat="server"
ImageUrl ="~/loading.gif" Style="display:None"/>
ThrobberID is used to display loading image instead of progress bar in unsupported browsers.
Type of files uploaded can be restricted by using AllowedFileTypes property with comma separated list such as "zip,doc,pdf".
Write following code in OnUploadComplete event to save the file.
C#
1protected void UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)2 {3 string path = Server.MapPath("~/Uploads/") + e.FileName;4 AjaxFileUpload1.SaveAs(path);5 }1protected void UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)2 {3 string path = Server.MapPath("~/Uploads/") + e.FileName;4 AjaxFileUpload1.SaveAs(path);5 }
0 comments:
Post a Comment