Problems with Dropdown list and selected value

  • Thread starter Thread starter Stewart Saathoff
  • Start date Start date
S

Stewart Saathoff

Hey,

I have a problem with a drop-down list. When I load the web form, the
dropdown list display's a set of all the employee's that is in the database.
If I set a breakpoint in the code and click the Login Button, the selected
text that appears is always the first one in the dataset. Does anyone know
why or has any idea on how to correct this?

Thanks,.

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim ws As New tcservice
Dsusers1.Merge(ws.GetEmployees)
Me.ddlemployee.DataBind()
End Sub


Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnLogin.Click
Dim u As String
Dim p As String
Session("user") = ""
Session("pass") = ""
u = Me.ddlemployee.SelectedItem.Text
p = Me.password.Text
Session("user") = u
Session("pass") = p
End Sub
 
Back
Top