Adding AJAX to existing ASP.NET application
Hi there,
I have an asp.net application that uploads a file to the server. It has a FileUpload component, a Upload button and a label to display the file details.
// Code behind
protected void UploadButton_Click(object sender, EventArgs e)
{
HttpFileCollection fileUpload;
HttpPostedFile postedFile = fileUpload[0];
Label1.Text = postedFile.FileName + "<br>";
}
I want that when the file is uploaded by the user on clicking the upload button, without refreshing the page, the label should be updated.
Please tell me a simple ajax solution. I am not using atlas.
Thanks.
Lols.
|