Hi Guys is me again!! I Have a question, if i have 2 asp.net pages (web forms) and form 1 (page 1) has a link that when clicked will generate form 2 (page 2). The trick is that form 2 (page 2) has a label that must load with a random number whenever page 2 is called.

I am lost as to how to accomplish this...any ideas???

So you want to assign a random number to the label's text?

(vb.net code)

On page load...

Dim rnd As Integer
Dim randomNum As New Random
rnd = randomNum.Next()
label1.text = rnd

The value of rnd will be assigned a random whole number between 1 and 2,147,483,647.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.