Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
750
How to display only one member in web combo drop down
posted

Hi All

I am binding my webcombo to list of my objects. My object has two field ID and Name. I want to display only name in combo and want to set ID as a value. Here is my sample code

 

sprayBoothWebCombo.DataSource = data;

sprayBoothWebCombo.DataBind();

sprayBoothWebCombo.DataTextField =

"Name";

sprayBoothWebCombo.DataValueField =

"ID" ;

But my combo is displaying Name and ID both.

Please see if anyone there can help me out..

Thanks