To generate a random number in a given range.
We can use the .NET bult-in Random class.

Random randobj = new Random();
       
        test1.Text = randobj.Next(0, 359).ToString();
        test2.Text = randobj.Next(60, 110).ToString();
        test3.Text = randobj.Next(60, 350).ToString();

In this way we can generate random number with in range in asp.net

Any doubts mail me: radhek@gmail.com

Blogged with Flock

Advertisements