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
How can you handle exceptions in asp.net?
How many types of state management are there in asp net?
can any one find and tell the difference between dot net and php which one is best ? which one we get more salary? which one is stable and which one is best for freshers and also better in future and carrer ? which one we wil get more salary sir ? please send ur valuable suggestions to kiranpulsar2007@gmail.com
How do you deploy your asp.net application?
Explain ViewState?
List the advantages and disadvantages of user control an custom control?
What is the default Orientation property in a Menu control?
Is asp.net a programming language?
What is a uri query?
if i want to give an alert message like "try after sometime" to a web page which is being seen by other person.if a web page is not seen by anyone then it should display otherwise it show a display a message stating that other person is viewing so try after some time........how can i implement this.
how to elimainte the similar data from the different tables
Can I read the hard disk serial # of the client computer using asp.net?
Why will you usually create an aspnet user account in the database for an asp.net web application?
How you can return View from ASP.NET Web API method?
What is http request and response?