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 |
Do cookies store passwords?
What is a WebService and what is the underlying protocol used in it? Namespace?
What is the use of Administration tool in Asp.net 2.0?
In cache where dats is stored and how(file or object?)
What is difference between response.redirect and server.transfer ?
2 Answers Kalinga Software, Satyam,
What are different types of authentication techniques that are used in connection strings to connect .net applications with microsoft sql server?
What is the difference between ASP Session State and ASP.Net Session State?
What are the various ways of securing a web site that could prevent from hacking etc ?
What is the use of session in web application?
what is the difference between sql 2000 and 2005?
Which of the following .NET framework supports Web API?
Define resource files.
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)