I have a form and I want each form to have a unique number when it is filled out so it will go into the database. How can I set this up so when the page loads in the label it will say 1 then the second time it loads it will say 2?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load F() End Sub Private Sub F() Dim _r As New Random() Dim n As Integer = _r.[Next](5) ' Can return 0, 1, 2, 3, or 4 Label1.Text = n.ToString End Sub
© COPYRIGHT 2024 ASPSnippets.com ALL RIGHTS RESERVED.