question

Chama avatar image
Chama asked

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
asp.net
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Matt Whitfield avatar image
Matt Whitfield answered
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.
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Chama avatar image Chama commented ·
Thanks you I ready try this before is not working. I search a lot I made like label. I need to populate ddl of second page . I kind confused when I have to in dropdown . Thanks
0 Likes 0 ·
Matt Whitfield avatar image Matt Whitfield ♦♦ commented ·
Ok, I really don't understand what you mean! Can you try explaining some more?
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.