M
mark
Hello
I want to display on a webpage Welcome Mark to a logged in user. Users login
using their email address but I want to display their Name from the same
table which stores email and password. Here is the code I'm using but it
doesn't work.
Sub Page_Load
Dim conMyData As SqlConnection
Dim cmdSelect As SqlCommand
conMyData = New SqlConnection(
"Server=mtsda;UID=user;PWD=password;Database=BAOL" ) conMyData.Open()
cmdSelect = New SqlCommand("Select Login_Name From Provider_Login where (
Provider_Email = <%=User.Identity.Name%>) ", conMyData )
lblLogin_Name.Text = cmdSelect.ExecuteScalar()
conMyData.Close()
End Sub
Appreciate your Help
I want to display on a webpage Welcome Mark to a logged in user. Users login
using their email address but I want to display their Name from the same
table which stores email and password. Here is the code I'm using but it
doesn't work.
Sub Page_Load
Dim conMyData As SqlConnection
Dim cmdSelect As SqlCommand
conMyData = New SqlConnection(
"Server=mtsda;UID=user;PWD=password;Database=BAOL" ) conMyData.Open()
cmdSelect = New SqlCommand("Select Login_Name From Provider_Login where (
Provider_Email = <%=User.Identity.Name%>) ", conMyData )
lblLogin_Name.Text = cmdSelect.ExecuteScalar()
conMyData.Close()
End Sub
Appreciate your Help