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 are the main components of the ADO object model? How are they used?

2 Answers   HCL, Syntax Softtech,


suppose we have two object;obj1 and obj2 can we assign obj2 to one1; and if yes; then after assigning suppose we delete obj2 then obj1 will retain obj2 value or not.

3 Answers  


How do you validate the controls in an ASP .NET page?

3 Answers  


When you use Ajax controls in the ASP.NET application?

0 Answers   Viscus Infotech,


Explain the difference between debug.write and trace.write? When should each be used?

0 Answers  






What are the Application_Start and Session_Start subroutines used for?

5 Answers   Siebel Systems,


Why asp.net is used?

0 Answers  


Difference between HTML control and Web Server Control?

4 Answers  


What is the parent class of all web server control?

0 Answers  


1.what is the application pool. 2.what is the HttpModile and Http Handler. 3.C# 3.0 Features ? 4.Anonoymous Type,methopd and claas in 3.0? 5.difference between statsic and const ? 6.session vs application 7.state management clint side and server side ? 8.Genric list 9.c# 3.0 vs 3.5

0 Answers   TCS,


What is Difference between Production Serves and Development Servers? And Suppose, m adding/deleting C# file in a project based on the Specific Requirement. These Files are Automatically updated in Production Servers? So Which tool is needed to do This One?

0 Answers  


calling result set one procedure to anothar procedure in sql2000

0 Answers  






Categories