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

How to manage pagination in a page?

2 Answers  


how can you handle "control is not part of this page " error?

3 Answers   FactorH,


What does mean by a neutral culture?

0 Answers   MindCracker,


How do you identify that the page is postback?

0 Answers  


What are two ways that you can set the minimum and maximum values for a rangevalidator? When would you use each technique?

1 Answers  






How to implement form based authentication in asp.net application?

0 Answers  


What are session state modes in asp.net?

0 Answers  


What are server-side comments in ASP.NET?

0 Answers   Winsol Solutions,


Where do we store our connection string in asp.net application?

0 Answers  


What is JIT, what are types of JITS and their purpose ?

3 Answers   Infosys,


How to Open any web page by clicking any Any ASPControl like (Checkbox,radio button or Button) without calling its event and without going to Siverside code?

5 Answers   LG Soft,


What is serialization?

5 Answers   Piramal Healthcare,


Categories