I want that when txt file data save in database that time progress display that "Processing nth of n records …" I trying with following code but not success
CurrentFileName = myFile.FileName;
string CurrentPath = Server.MapPath("~/Uploadfile/");
CurrentPath += CurrentFileName;
myFile.SaveAs(CurrentPath);
fname = CurrentFileName;
DataTable dt = new DataTable();
StreamReader sw = new StreamReader(CurrentPath);
var linecount = File.ReadAllLines(CurrentPath).Length;
//lblmsg1.Text = linecount.ToString();
while (!sw.EndOfStream)
{
count++;
lblmsg1forcount.Text = " processing" + count.ToString() + "th Of" + linecount.ToString() + " Records .......";
string[] partsOfString = sw.ReadLine().Split('~');
string str1 = partsOfString[0];
string str2 = partsOfString[1];
string str = partsOfString[2];
string str3 = partsOfString[3];
string str4 = partsOfString[4];
}