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 |
Is it necessary to undertsand these events of an ASPX page execute. Explain its importantance?
What is ispostback property?
When we are requesting a new URL through Response.Redirect() the new page wil open on the new browser window or it wil open in the same window? If we use Server.Transfer() what wil happen?
What are PDBs? Where must they be located for debugging to work?
how to edit gridview control in asp.net2.0
What are ASHX files?
can we pass coditions in swtich case?
What is an application domain ?
What is .net framework and what are the main components of it?
What is clr? Difference between clr & cts?
How do I use a proxy server when invoking a web service?
Differentiate between a hyperlink control and a linkbutton control.
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)