How do I reference the values in a textbox in a separate VB module.
In my login.aspx.vb module I have
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
Now in my separate Security.vb module I want to check that the values aren't null and send them to the database but I can't appear to reference the values correctly to do this. Can anyone help?
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