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 validationsummary server control? where it is used ?

1 Answers  


what is assembly?

4 Answers   Microsoft,


If I update session state, should I lock it, too? Are concurrent accesses by multiple requests executing on multiple threads a concern with session state?

1 Answers  


What is the role of global.asax?

10 Answers   Infosys,


What kind of data can be stored in viewstate?

0 Answers  






Explain different types of Caching techniques in ASP.NET?

0 Answers   Sans Pareil IT Services,


What is boxing?

8 Answers   IBM, Misys, Siebel Systems,


What is the Global ASA(X) File?

2 Answers  


What is a bubbled event?

2 Answers  


WHAT IS BOXING? HOW WE CAN USE IT?

4 Answers   Seion Infotech,


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

0 Answers  


Can we use html in asp.net?

0 Answers  


Categories