|
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.
|
|