Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a dropdown list on my page and a submit button.

However, When I change my selection and press submit, it always takes the first value out of the list!

e.g. I have a list with 3 entries, Horsebox, Trailer and Car

Like this:

 

Horsebox

Trailer

Car

 

I select Car from the drop down and press Submit.

 

Then the page passes through the name in the url

 

i.e Department_Id="Car"

 

However, it always passes through the first value in the list and this is despite me setting the following code:

 

Sub Go_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Go.Click
       Dim strSelected As String
       strSelected = oDeps.SelectedItem.Text
       Response.Redirect("trainingplans.aspx?dept_id=" & oDeps.SelectedItem.Text)
   End Sub

 

any ideas why it is not taking the value I selected in the drop down box?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...