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
What is application in asp net?
when a request is made in Life cycle of ASP.NET page .
How can we secure the data which is send from client side to server? Like the login id and paasword needs to be authenticated on the server but we cannot send it in plain text into the server.One more thing we are not using the SSL here.
Is it possible to apply themes to an asp.net application? If yes, then how?
What is data cache in sql server?
What is a 307 redirect?
What is a user developed application?
Is asp.net free?
Explain the difference between page.registerclientscriptblock and page.registerstartupscript?
If I am developing an application that must accomodate multiple security levels though secure login and my asp.net web application is spanned across three web-servers (using round-robin load balancing). What would be the best approach to maintain login-in state for the users?
Can you explain autopostback?
What is a gridview in asp.net?
What is data binding in asp net?
What is caching? What are different ways of caching in asp.net?
Fetch one page value to another page without using state-managment ?