0

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???

2
Contributors
1
Reply
3
Views
5 Years
Discussion Span
Last Post by JorgeM
0

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.