0

I need to display process bar when i press add button and 1000 static data is insert into database.

e.g. I write "sangeet" into textbox and when i press submit at the time this sangeet word is insert into database using c# code 1000 time insert. insertation take much time to insert so i need to display process bar at front site when insertation into progress. how many time word is insert.

code:-

public void add()
{

  for(i=0;i<=1000;i++)
  {
       insert("sangeet"); // insert method that insert this word into database
  }

}

how can i do it?

sangeet
  • 121
  • 6

1 Answers1

0

for server side progress int progress = limit/i where limit =1000 and i is your for loop variable

for client side progress (used for progress bar) Run the code with a for loop in java-script and let the java-script method do a server call to insert into the database. then use then use Using progress bar in asp.net

Community
  • 1
  • 1
Neil
  • 641
  • 1
  • 7
  • 21