Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

databound dropdown list problem...

Status
Not open for further replies.

fowlerlfc

MIS
Mar 20, 2002
136
US
I've bound SQL data to a dropdownlist successfully, but no matter what choice is made in the dropdownlist, the first item is the only one that will display in ddl.selecteditem.text...

For example the first item is #wrtcart001. The secound item is #wrtcart002. If I choose the second item, ddl.selecteditem.test still holds #wrtcart001.

Any ideas?

Thanks in advance for your help!
 
Could you post the code you're using to bind this dropdownlist?

Also, verify that the dropdownlist is being populated outside of a postback. That should look something like...
Code:
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        If Not IsPostBack Then
            ' Bind DropDownList
        End If

    End Sub

Regards,
Mike

"Don’t get suckered in by the comments – they can be terribly misleading. Debug
only code. – Dave Storer."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top