dharmendr says:
for
(
int
i = 0; i < Convert.ToInt32(txtValue.Text.Trim()); i++)
{
int
n = random.Next(0, 100000);
number += n.ToString(
"D5"
) +
"<br/>"
;
}
You need to change the code like below. For insert code into database you have to check the data already present or not. If not present then insert into database.
for (int i = 0; i < Convert.ToInt32(txtValue.Text.Trim()); i++)
{
int n = random.Next(0, 100000);
number = n.ToString("D5") ;
// Code for insert the no to database.
}