number generator in c# not random numeber

commented: stupidly vague description of problem -1
commented: Poorly written -1

Good for you.

In what context are you trying to use the random number generator, what errors are you getting and do you want help or are you just stating that it doesnt work ?

If it's not random, you need to specify what rules have to be in place for generating each number. For example, is it a sequence number? A number based on the date and time? "Not random" is not helpful; the best one can offer is this:

// Generate N "not random" numbers
for (int i = 0; i < n; i++)
private void Form1_Load(object sender, EventArgs e)
            con.ConnectionString = "server=MANI;uid=sa;password=sql;database=pro";
            cmd.Connection = con;
            string sql;
            sql = "select MAX(pno)from product=" + textBox1.Text;
            cmd.CommandText = sql;
             if (dr.Read())
                textBox1.Text = dr.GetValue(1).ToString() + 1;