Hello Friend Toady YOu Will learn About File upload control of Without Ajax and Async File Uplaod Control of Ajax which have introduced New Release of Ajax
first You Will Learn about How to Use the traditional way of File upload when it was not int AJax Toolkit
Step1 : Make a new website In Visual Studio 2008 and Add a new master page into your application As below given design
Step 3: Master Page Source Code Will Be As Below Given
STep 4: And Into code file of master page write down this method
public void RegisterPostbackTrigger(Control triggerOn)
Step 5: Now Double Click ON Submit Button ANd Write down the below given code in code behind file of content page
public partial class Default2 : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
protected void btnSubmit_Click(object sender, EventArgs e)
String _strTenderDocument = string.Empty; ;
Random r = new Random();
_strTenderDocument= r.Next(10, 10000) + r.Next(10, 10000) + “.” + (Convert.ToString(FileUpload1.FileName).Substring(Convert.ToString(FileUpload1.FileName).Length – 4, 4)).ToString();
//UploadedDocuments Create this directory into ur web application
FileUpload1.SaveAs(Server.MapPath(“~/UploadedDocuments/” + _strTenderDocument));
catch (Exception ex)
Response.Write(“Warning!!! There is an error with uploading tender document.
Error in:-” + ex.Message);
Response.Write(“Caution!!! You are floated an tender without any tender document.”);
STep 6: Now Make A Directory with UploadedDocuments Name where your uploaded document will be saved and run your application you will see on post back your file upload control will work into update panel.
and saved the document within desire location.
Hope You Will Be Happy with this use.
and enjoy in Programing world.
Fileupload Control Actually Want fullpost back so we need to fire the post back trigger.