Pages

Subscribe:

Ads 468x60px

Sunday, May 13, 2012

How to generate random numbers in asp.net using c#

in this we programming tutorial we will learn that how we can create random number in asp.net using c#. see the below code and just copy and paste.
Random rand = new Random((int)DateTime.Now.Ticks);
        int numIterations = 0;
        numIterations=  rand.Next(1, 100);
        Response.Write(numIterations.ToString());

1 comment:

Ankit kumar said...

really nice and informative post thanks for sharing it. Keep up.

Post a Comment