i m working on a web application that reads files from some where and writes it down on the disk using System.IO.FileStream class. Is it possible to display some kind of progress bar or update bar while i write these files.
Here is sample code
using (Stream input = getResponse.GetResponseStream())
{
using (FileStream output = new FileStream(saveTo1, FileMode.OpenOrCreate))
{
int bytesRead;
while ((bytesRead = input.Read(buffer, 0, buffer.Length))>0)
{
output.Write(buffer, 0, bytesRead);
}
}
}
Thanks in advance. 🙂
Try using Update Progress.
What you need to do?
Update Panel say “UPanelOperation”.
Please change the image name to whatever image you have in the following lines of code