How to upload a file using file upload control inside the
Update Panel???
Answer Posted / manikanta
In source aspx page
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<cc1:AsyncFileUpload ID="AsyncFileUpload1"
runat="server" UploaderStyle="Modern" ThrobberID="img1" />
<br />
<asp:Button ID="btnUpload" runat="server" Text="Upload"
onclick="btnUpload_Click" />
in Aspx.cs
{
AsyncFileUpload1.SaveAs(Server.MapPath((AsyncFileUpload1.FileName)));
Label1.Text = "You uploaded " +
AsyncFileUpload1.FileName;
}
Try running this and you will find that the whole operation
happens asynchronously without a full page reload. Note
that, you would need to still put the AsyncFileUpload
control inside UpdatPanel for this behaviour. Otherwise, it
would behave like a regular postback control.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks
Explain the different parts that constitute ASP.NET application?
How is mvc different from asp.net? : Asp.Net MVC
What is application Object?
What is data reader in asp.net?
Why asp.net is used?
What is session state server?
What is the use of the tag in the web.config file?
How to implement role based security in asp.net mvc? : Asp.Net MVC
What is meant by ispostback in asp net?
How to turn off cookies for a page?
How to change Master page in ASP.Net using code?
How does viewstate work?
Explain the difference between asp.net mvc and asp.net webforms
What is difference between session and viewstate?