Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: DropdownList problem


Message #1 by "Bob Herrmann" <bob@m...> on Thu, 23 Jan 2003 12:40:32 -0500
Thanks Mitchell,

That worked perfectly!
----- Original Message -----
From: "Mitchell Adams" <MADAMS@p...>
To: "ASPX_Professional" <aspx_professional@p...>
Sent: Thursday, January 23, 2003 1:03 PM
Subject: [aspx_professional] Re: DropdownList problem


Try this:

DropDownState.DataSource = objDataSet.Tables("State")
DropDownState.DataBind()
DropDownState.Items.FindByValue("FL").Selected = true


>>> bob@m... 01/23/03 12:40PM >>>
Hi all,

I have a Dropdownlist control on my asp.net page that I bind to a SQL table
named tabState.  I then update my customer table with the state code when I
click my submit button.  This all works great.  My problem is when I display
the details of an existing customer.  I would like to read the state code
value from my customer table and then display my dropdownlist control with
this state item selected.  I cannot seem to figure this out.  Any help would
be appreciated.
VB.Net preferred.

Thanks,
Bob





  Return to Index