Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

i still cant display the value

Status
Not open for further replies.

killerg

Programmer
Joined
Dec 2, 2006
Messages
15
Location
CY
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.

 
[red]strng[/red] = Request.QueryString("Name")

Response.Write("Your name is " & sName[red]strng[/red])

-DNG
 
thanks a lot i found the way
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top