GetRandomNumber in asp.net
Public Shared Function GetRandomNumber() As String
Dim rand As New Random()
Dim newpassword As New StringBuilder("")
For index As Integer = 1 To 2
newpassword.Append(CChar(CChar(CStr(rand.[Next](65, 90)))))
Next
For index As Integer = 0 To 2
newpassword.Insert(rand.[Next](0, 3 + index), Convert.ToString(rand.[Next](0, 9)))
Next
Return ("OD" + newpassword.ToString() + DateTime.Now.Day.ToString())
End Function
Dim rand As New Random()
Dim newpassword As New StringBuilder("")
For index As Integer = 1 To 2
newpassword.Append(CChar(CChar(CStr(rand.[Next](65, 90)))))
Next
For index As Integer = 0 To 2
newpassword.Insert(rand.[Next](0, 3 + index), Convert.ToString(rand.[Next](0, 9)))
Next
Return ("OD" + newpassword.ToString() + DateTime.Now.Day.ToString())
End Function