File size base display bar
how to create?

Advance thanks
Thanks & regards
Vivekanandan.R

Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Lalit MPosted Dec 7, 2009, 5:57 AM
Lalit MPosted Dec 7, 2009, 5:42 AM
Use this Code sample
{// the URL to download the file from// the path to write the file to// first, we need to get the exact size (in bytes) of the file we are downloadingUri url = new Uri(sUrlToReadFileFrom);// gets the size of the file in bytes// keeps track of the total bytes downloaded so we can update the progress bar// use the webclient object to download the file{// open the file at the remote URL for reading{// using the FileStream object, we can write the downloaded bytes to the file system{// loop the stream and get the file into the byte bufferint iByteSize = 0;while ((iByteSize = streamRemote.Read(byteBuffer, 0, byteBuffer.Length)) > 0){// write the bytes to the file system at the file path specified// calculate the progress out of a base "100"double dProgressPercentage = (dIndex / dTotal);// update the progress bar// clean up the file stream// close the connection to the remote serverKirtan PatelPosted Dec 7, 2009, 5:42 AM