I have two combobox .. and i have some items in both combobox
now i need to check the item in both combobox if same item
is Present in both combobox i need to display that item in
message box
Answer Posted / kirupa
for (int i = 0; i <= comboBox1.Items.Count-1; i++)
{
for (int j = 0; j <= comboBox2.Items.Count-1; j++)
{
if (comboBox1.Items[i].ToString() == comboBox2.Items
[j].ToString())
MessageBox.Show(comboBox1.Items[i].ToString());
}
}
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
Explain the difference between listindex and tab index?
What is the advantage of a form?
What is the use of form?
How many types of dialog boxes windows provides?
How to split a column header in gridview using c#.net?
What is the extension of the windows installer file?
Suppose I am implementing one windows form. I am inserting some values into ms access. In that table 5 columns there. But I want to insert three columns only. When I am clicking another button then other two values also insert into that table?
Name the event that enables the user to prevent shifting of focus from control until all the validation rules have been met.
how print barcode
Explain how to net forms the windows?
how see report periviwe
Explain how to find the current record position in data control?
How to use the FindControl() function to preselect an item in my dropdownlist?
What are the forms of database?
Which window displays messages for the status of various features provided in the visual studio .net ide?