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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting selected item from combobox??

Status
Not open for further replies.

rahmanjan

Programmer
Apr 13, 2003
180
AU
hi all,

I am getting the selected item in asp.net by:

string str=cboCat.selectedItem.text

how can i do it in windows form. It looks like it is differnt??

Is it?

regards

 
Object obj=Combo1.SelectedItem;

Then do as you wish with obj

Craig
 
That does not work for me.

string str=cboCat.selectedItem.text // shows nothing

Object obj=Combo1.SelectedItem; //shows some vb code rather than my text

regards

any other thing?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top