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 / mona

For inti As Integer = 0 To ComboBox1.Items.Count
For intj As Integer = 0 To ComboBox2.Items.Count
If ComboBox1.Items(inti).ToString =
ComboBox2.Items(intj).ToString Then
MessageBox.Show(ComboBox1.Items(inti))
End If
Next
Next


The answer should be modified. The loop should not go upto
the count-1 but should go upto count. Rest all is OK.

Is This Answer Correct ?    1 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many navigational features are provided by visual studio.net ide?

616


How to get records from a database?

591


Explain the difference between listindex and tab index?

548


How to show a ContextMenuStrip instead of cthe default ContextMenuStrip,when you rightclick on the non client area of a window's Form or when alt+space keys are pressed

1806


Explain the new events in textbox that has been included in vb?

537






how print barcode

2107


How to use the FindControl() function to preselect an item in my dropdownlist?

1701


To which namespace does the control class belong?

531


Which property is used to specify the use of an element in the user interface and reports it to the accessibility aids?

555


Name the class to be inherited for creating a custom control.

566


Explain how to find the current record position in data control?

498


Explain how to split a column header in gridview using c#.net?

550


How save rerecord in the database?

593


What is the difference between pixels, points, and em’s when fonts are displayed?

556


What is the difference between a document and a form?

535