is it true
string a=comboBox1.SelectedText.ToString();
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Girish SapariyaPosted Nov 27, 2013, 12:33 AM
Are you binding your combo box at design time or run time?
can you share your code for binding combo box, so we can get exact idea on how it wiil do
thanks
Reyad KhalifehPosted Nov 25, 2013, 6:30 AM
Da = new SqlDataAdapter("Select * From MyData Where Thing='"+comboBox1.Text+"'", cn);
Da.Fill(Dt);
string id = Dt.Rows[0]["IdThing"].ToString();
string thing = Dt.Rows[0]["Thing"].ToString();
string Price = Dt.Rows[0]["Price"].ToString();
so , I want to bring a current item (I mean the item which user select it in combobox) then send it to stored procedure sql to return all it(current item) informations .
Girish SapariyaPosted Nov 25, 2013, 12:31 AM
What exactly are you binding with combobox?
if you are binding a simple list of string then
string str = comboBox1.SelectedItem.ToString();
if not
can u please lets us know what are u binding with your combobx.
Abhay ShankerPosted Nov 24, 2013, 11:32 PM
Reyad KhalifehPosted Nov 24, 2013, 3:51 PM
VulpesPosted Nov 24, 2013, 3:16 PM
string a = comboBox1.SelectedItem.ToString();