Everton1Blue
Technical User
Hello
I have a Web page here, but instead of the welcome message greeting the user's email, I have:
strEmailValue is the user's email address (the variable)
strEmail is the email column in my database
strEmailTextBox is the ID of the email form field
What is the reason, please, why I get the variable 'strEmailValue' and not the user's actual email address in the image I have posted?
There are two relevant files, myLogon.aspx.vb and userpage.aspx.vb to which the user is directed after logging on.
In myLogon.aspx.vb, I have:
In userpage.aspx.vb, I have:
What mistake I making, please?
Thank you.
I have a Web page here, but instead of the welcome message greeting the user's email, I have:
strEmailValue is the user's email address (the variable)
strEmail is the email column in my database
strEmailTextBox is the ID of the email form field
What is the reason, please, why I get the variable 'strEmailValue' and not the user's actual email address in the image I have posted?
There are two relevant files, myLogon.aspx.vb and userpage.aspx.vb to which the user is directed after logging on.
In myLogon.aspx.vb, I have:
Code:
Protected Sub LogonBtn_Click(sender As Object, e As EventArgs) Handles LogonBtn.Click
'Authenticate the user
Dim Authenticated As Boolean = Authenticate(strEmailTextBox.Text, passwordTextBox.Text)
'If results found, redirect the user
If Authenticated Then
Dim target = String.Format("~/userpage.aspx?strEmailValue={0}", strEmailTextBox.Text)
Response.Redirect(target, False)
End If
End Sub
In userpage.aspx.vb, I have:
Code:
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim strEmailValue As String
Label2.Text = "Hello " & strEmailValue & ", welcome!"
End If
If Not String.IsNullOrEmpty(Request.QueryString("strEmailValue")) Then
Message = Request.QueryString("strEmailValue")
End If
End Sub
What mistake I making, please?
Thank you.