is it true
string a=comboBox1.SelectedText.ToString();
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Nov 24, 2013, 10:16 AM EST
string a = comboBox1.SelectedItem.ToString();
Reyad Khalifeh6 reputationPosted Nov 24, 2013, 10:51 AM EST
Abhay ShankerRank #375 · 6.7K reputationPosted Nov 24, 2013, 6:32 PM EST
Girish Sapariya159 reputationPosted Nov 24, 2013, 7:31 PM EST
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.
Reyad Khalifeh6 reputationPosted Nov 25, 2013, 1:30 AM EST
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 Sapariya159 reputationPosted Nov 26, 2013, 7:33 PM EST
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