Crossing page to give name or user (using dropdown) in vb.net
I created a page login ..Ok it is work fine...I using dropdwon to login if go to another page but i have issued becuase i want this particula user populate in another dropdown that i have second page...how i can made this happen...I using
vb.net and sql. This is my code... It is connecting ready to dabase... Make fuction to connect to data (DATACONNETION) ... in my connection i use store procedure to connect.. I created sqldatastore to give name in the dropdown and after choose the user and enter password it is going to another page. I really need help I dont know how connect my page and page to give username that i looged Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click If Page.IsValid Then If DataConnection(ddllogin.Text, txtPassword.Text) Then FormsAuthentication.RedirectFromLoginPage(ddllogin.Text, True) Session("Location") = Trim(ddllogin.Text) Response.Redirect("
StatusEntry.aspx", True) End If Else txtMessage.Text = "Invalid Login" End If End Sub
This is entirely the wrong place to ask this question. But, you probably want something like this in your Page_Load procedure on the second page: control_where_i_want_stuff.Text = Session("Location") There are a lot of questions, such as do you really want to be storing the user's login name in the session, and do you actually want to be showing their login name on the page? And the whole thing about having the logins in a dropdown just sounds wrong. But I'm just making you aware of the things you might want to think about / research, while giving you an answer to the problem at hand.