iam trying to do the login page and i want
to pass the name value to the default page but not
very sure how to post it and request it i
have the following code which at the moment
only goes to the default page but how do i
pass the value of the name?
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim dbconn, sql, dbcomm, dbread
dbconn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=" & Server.MapPath("App_Data\Login.mdb"))
dbconn.Open()
sql = "SELECT Name FROM Login_details WHERE Email = '" & mail.Text & "' AND 'Password'= '" & pass.Text & "' "
dbcomm = New OleDbCommand(sql, dbconn)
dbread = dbcomm.ExecuteReader()
Dim strng As String
While dbread.Read()
strng = dbread("name")
End While
Response.Redirect("Default.aspx?Name=" + strng)
End Sub
Tek-Tips Forums is Member Supported. Click Here to donate.
jbenson001 (Programmer) 2 Dec 06 22:35
Use Request.Qyerystring("Name") on Default.aspx
Jim
killerg (Programmer) 3 Dec 06 16:22
Dim strng As String
strng = Request.QueryString("Name")
Response.Write("Your name is " & sName)
thats what i have in the default but it doesnt pass the value.
to pass the name value to the default page but not
very sure how to post it and request it i
have the following code which at the moment
only goes to the default page but how do i
pass the value of the name?
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim dbconn, sql, dbcomm, dbread
dbconn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=" & Server.MapPath("App_Data\Login.mdb"))
dbconn.Open()
sql = "SELECT Name FROM Login_details WHERE Email = '" & mail.Text & "' AND 'Password'= '" & pass.Text & "' "
dbcomm = New OleDbCommand(sql, dbconn)
dbread = dbcomm.ExecuteReader()
Dim strng As String
While dbread.Read()
strng = dbread("name")
End While
Response.Redirect("Default.aspx?Name=" + strng)
End Sub
Tek-Tips Forums is Member Supported. Click Here to donate.
jbenson001 (Programmer) 2 Dec 06 22:35
Use Request.Qyerystring("Name") on Default.aspx
Jim
killerg (Programmer) 3 Dec 06 16:22
Dim strng As String
strng = Request.QueryString("Name")
Response.Write("Your name is " & sName)
thats what i have in the default but it doesnt pass the value.