Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
Dropdown List - display value/actual id
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="PlatinumBay, post: 2917886"] mercvntracy, Yes, the DropDownList supports setting both the text and the value, as in the following example: <asp:DropDownList id="stateList2" runat="server"> <asp:ListItem Selected="True" Value="" Text=""/> <asp:ListItem Value="Confusion" Text="Confusion"/> <asp:ListItem Value="Denial" Text="Denial"/> </asp:DropDownList> To set this programatically, the Add method takes an overload allowing you to pass in a ListItem object. Public Sub New(ByVal [text] As String, ByVal value As String) Try the following: cmdManufacturer.Items.Add(New ListItem(manufactureData.MANUFACTURE_NAME, <value>)) Hope this helps, Steve [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
Dropdown List - display value/actual id
Top