How to upload a file using file upload control inside the
Update Panel???

Answers were Sorted based on User's Feedback



How to upload a file using file upload control inside the Update Panel???..

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 upload a file using file upload control inside the Update Panel???..

Answer / vivek

using Triggers

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More ASP.NET Interview Questions

What is asp.net response object?

0 Answers  


Explain what are delegates?

0 Answers  


Hi..I have created a website in Asp.net with C# i want to add Chinese language in my website..could any body tell me that how can i add dynamically this language on user's request...??? thanks n advance...

1 Answers  


Which is an advantage of application service providers?

0 Answers  


What is the default Orientation property in a Menu control?

0 Answers   Sans Pareil IT Services,


What is the difference between ASP.NET Webforms and ASP.NET MVC?

0 Answers  


How many types of state management are there in asp net?

0 Answers  


How many web.copnfig can exists in a web application & which will be used ?

3 Answers   MMTS,


What is the default timeout for a cookie?

0 Answers  


What is session in asp.net?

0 Answers  


How does a content page different from a master page?

0 Answers   MindCracker,


explain code with datachaching with example

0 Answers  


Categories