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 |
What is validationsummary server control? where it is used ?
what is assembly?
If I update session state, should I lock it, too? Are concurrent accesses by multiple requests executing on multiple threads a concern with session state?
What is the role of global.asax?
What kind of data can be stored in viewstate?
Explain different types of Caching techniques in ASP.NET?
0 Answers Sans Pareil IT Services,
What is boxing?
8 Answers IBM, Misys, Siebel Systems,
What is the Global ASA(X) File?
What is a bubbled event?
WHAT IS BOXING? HOW WE CAN USE IT?
How many types of state management are there in asp net?
Can we use html in asp.net?