Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to upload a file using file upload control inside the
Update Panel???

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How response object is related to asp's response object?

902


How is mvc different from asp.net? : Asp.Net MVC

1032


How do u declare static variable and how it is declared and what is its lifetime?

1019


What are the steps involved to fill a dataset?

1008


What are the ways of preserving data on a Web Form in ASP.NET?

1074


What are the different session state management options available in asp.net?

977


What is meant by web application?

943


What are the media types of http requests and response?

974


What is session object? Describe in detail.

1005


What are the options in ASP.NET to maintain state?

1112


Disable browser cache for entire ASP.NET website?

1186


How can you enable impersonation in the web.config file?

1134


Mention the execution process for managed code?

971


What is preprocessor in .net?

962


What are the difference between function and stored procedure in .net programming language?

688