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 |
Which control would you use if you needed to make sure the values in two different controls matched?
How many types of validation are there?
Which tools of web site Administartion tool do you use to manage user,roles and rules?
What is role-based security in asp.net?
How to Convert a String into Float without using any built- in library of .NET String = "1235.45" needs to converted to a float
What is server infrastructure & server components?
What is dynamic web page with example?
How asp.net mvc differs from asp.net web forms? : asp.net mvc
What is difference between Lambda Expression and LINQ in ASP.NET?
How we implement the multiple paypal value with gridview in my website and how we make a payment through Credit Card.
What is data cache in sql server?
Is asp.net a programming language?