Subject: Drop down list text value not posting back with co
Posted By: binici Post Date: 12/12/2006 7:38:57 PM
Hello:

This may sound confusing, but I have dropdownlist and databinding it, and have set the DataTextField and DataValueField correctly, but on the page itself when I choose the text from the dropdown it acts wacky on some of the values and chooses another value.

here is some code:

aspx page

<asp:dropDownList ID="outside_assoc_cities" runat="server" AutoPostBack="True" Enabled="False" DataTextField="city" DataValueField="mls_id" Visible="False"></asp:dropDownList>

codebehind

Protected Sub recip_form_type_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles recip_form_type.SelectedIndexChanged
If recip_form_type.SelectedItem.Value <> "0" Then
outside_assoc_cities.Enabled = True
ElseIf recip_form_type.SelectedItem.Value = "0" Then
outside_assoc_cities.Enabled = False
outside_assoc_cities.SelectedIndex = "0"
End If
End Sub

If anyone wants to see this wackiness, let me know so I can put it on a public site.


Go to topic 53509

Return to index page 95
Return to index page 94
Return to index page 93
Return to index page 92
Return to index page 91
Return to index page 90
Return to index page 89
Return to index page 88
Return to index page 87
Return to index page 86