ASP.NET File Upload Progress - Use of StatusPanel Control

This example demonstrates File Upload Progress and StatusPanel controls use.
You will see that after uploading finish the page is not reloaded.

Example code

<%@ Register TagPrefix="fup" Namespace="OboutInc.FileUpload" Assembly="obout_FileUpload" %>
<script runat="server" language="c#">
  void Page_load(object sender, EventArgs e) {
if (Page.IsPostBack) {
HttpFileCollection files = Page.Request.Files;
if (files.Count == 0)
ServerResponse.Text = "no file";
else {
ServerResponse.Text   = "<b>Successfully uploaded file:</b><br />";
ServerResponse.Text += "<span style='color:#0033cc;'>" + files[0].FileName + "</span>";
ServerResponse.Text += "&nbsp;&nbsp;" +files[0].ContentLength.ToString() + " bytes";
}
}
  }
</script>
<script type="text/JavaScript">
  function Clear(){ document.getElementById("<%= ServerResponse.ClientID %>").innerHTML= "";}
</script>
...
<input type=file name="myFile1"><br/>
<input type=submit value="submit" name="mySubmit"><br/>
<fup:FileUploadProgress runat="server" OnClientProgressStarted="Clear" />
<fup:StatusPanel runat="server">
      <asp:Label runat="server" id="ServerResponse" Text="" />
</fup:StatusPanel>



 

"One more thing I would like to share with you guys is, what a great outstanding solutions and very quick response with efficient support. I'm really so inspired with these components and it’s like very superior while working with these components. I'm so impressed and great work. I hope you are shaking presentation in this world :) Thank you once again ALL THE BEST!"

R.B.

Random testimonial   All testimonials