How to upload a file using file upload control inside the
Update Panel???
Answers were Sorted based on User's Feedback
Answer / 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 |
How to manage pagination in a page?
how can you handle "control is not part of this page " error?
What does mean by a neutral culture?
How do you identify that the page is postback?
What are two ways that you can set the minimum and maximum values for a rangevalidator? When would you use each technique?
How to implement form based authentication in asp.net application?
What are session state modes in asp.net?
What are server-side comments in ASP.NET?
Where do we store our connection string in asp.net application?
What is JIT, what are types of JITS and their purpose ?
How to Open any web page by clicking any Any ASPControl like (Checkbox,radio button or Button) without calling its event and without going to Siverside code?
What is serialization?