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;
            fname = CurrentFileName;
            DataTable dt = new DataTable();
            StreamReader sw = new StreamReader(CurrentPath);
            var linecount = File.ReadAllLines(CurrentPath).Length;
            //lblmsg1.Text = linecount.ToString();
            while (!sw.EndOfStream)
                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];

What wasn't a success?

Keep in mind that all of the processing happens server side and when its completed, the results are sent back to the browser as HTML.

If you want to create some type of real time progress/status bar, you'll need a client side solution that receives data from the server in real time.