如何在单独的 VB 模块中引用文本框中的值。
在我的 login.aspx.vb 模块中,我有
Public Class login
Inherits System.Web.UI.Page
Private _inlineAssignHelper As String
Protected Sub LoginButton(ByVal sender As Object,
ByVal e As System.EventArgs) Handles Button1.Click
Dim UserLogin As New String("")
Dim UserPass As New String("")
UserLogin = username.Text
UserPass = password.Text
Dim SecurityUser As New SecurityUser(UserLogin)
Dim SecurityPass As New SecurityPass(UserPass)
End Sub
End Class
现在在我单独的 Security.vb 模块中,我想检查这些值是否不为空并将它们发送到数据库,但我似乎无法正确引用这些值来执行此操作。任何人都可以帮忙吗?
Public Sub securityCheck(UserLogin, UserPass)
Dim securityCheck As Array()
' Dim User As String = TheNRLPredator.login.LoginButton(UserLogin)
If (String.IsNullOrEmpty(TheNRLPredator.login.(UserLogin) _
&& String.IsNullOrEmpty(TheNRLPredator.login.(UserLogin) =True) Then
MsgBox("You need to enter a Username and Password")
Else
'send to database to check.
End If
End Sub