How to display Progress bar while page is loading

<pre> <code> protected void Page_Load(object sender, EventArgs e) { showPageLoad(); //do somthing     } private void showPageLoad() { int i=0; Response.Write(“<div id=’divTitle’>Loading(<span id=’message’>0%</span>)</div>”); Response.Flush(); for(i=5;i<=100;i=i+5) { System.Threading.Thread.Sleep(200);// any codes can be typed here outputflash(i.ToString() + “%”); Response.Flush(); } } private void removePageLoad() { ScriptManager.RegisterStartupScript(Page, this.GetType(), “deleteLoading”, “var d = document.getElementById(‘divTitle’);d.parentNode.removeChild(d);”, true);     } private void …

Download / Upload Files on FTP Server

Require following ftp details where you want to upload the files: FTP URL: “ftp://ftp.yoursite.com/” FTP Username: username FTP Password: password FTP Port: 21 Upload File public string UploadFile(string FtpUrl, string fileName, string userName, string password, string UploadDirectory = “”) { string PureFileName = new FileInfo(fileName).Name; String uploadUrl = String.Format(“{0}{1}/{2}”, FtpUrl, UploadDirectory, PureFileName); FtpWebRequest req = …