Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to use value member with a databound combobox

Posted on 2007-11-14
3
Medium Priority
?
838 Views
Last Modified: 2013-12-17
I have a combobox that is bound to a table. The display member is the column that has the persons name. The value member is linked to the column that has the persons social security number. I have two questions:

What is the best event to use when dealing with comboboxes. I just want the basic one where when the user selects an item, it will run code from the event.

Lets say I have a variable 'x'. How do I set x to the persons social security number on the event when someone selects a name.
0
Comment
Question by:tiehaze
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 23

Assisted Solution

by:Ashish Patel
Ashish Patel earned 2000 total points
ID: 20287046
onChange Event.

in javascript
var x = document.forms[0].ComboBoxName.value;
0
 

Author Comment

by:tiehaze
ID: 20287065
I am using visual studio... there is no onChange event for comboboxes.

I am also using c#
0
 
LVL 23

Accepted Solution

by:
Ashish Patel earned 2000 total points
ID: 20287132
You need event for javascript or C# code behind?
If javascript event is required then go to html souce code and in the CheckBox list tag write onChange manually, as this wont appear in the event list. like below

<asp:CheckBoxList ID="CheckBoxList1" runat="server" onChange="CallFunction()">
        </asp:CheckBoxList>

And if you need C# event then just double click on the CheckBox List and SelectedIndexChange event will turn up and you will have to use this.
0

Featured Post

Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question