必须从数组列表中选择一个随机数,以从数据库中生成正确的信息,此时它在 rnd 行上的窃听
Dim rn As New List(Of Integer)
Dim QPass As String
rn.Add(71)
rn.Add(72)
rn.Add(79)
rn.Add(80)
Dim index As Integer = CInt(Math.Floor(Rnd() * 4))
Dim randomValue As Integer = CInt(rn(index))
QPass = randomValue.ToString()
Session("Pt2") = rn
PT2imgImage.ImageUrl = "showImage.ashx?i=" + QPass
PT2imgImage.Width = Unit.Pixel(600)