Hi All
I have proble searching the combobox.
I want to use a text box to search a combo box. Like as we type in the text box it should search the combo box. Kind of synchro ???
How to do this.
I created the same in VB but don't know how to do it in ASP.
I'm giving you a VB Code.
Please Help....
for ASP its giving error cboname --- object required
I have proble searching the combobox.
I want to use a text box to search a combo box. Like as we type in the text box it should search the combo box. Kind of synchro ???
How to do this.
I created the same in VB but don't know how to do it in ASP.
I'm giving you a VB Code.
Please Help....
for ASP its giving error cboname --- object required
Code:
Private Sub txtFind_Change()
lngCurr = cboName.ListIndex
For i = 0 To cboName.ListCount - 1
cboName.ListIndex = i
If Left(UCase(cboName.Text), Len(txtFind.Text)) = UCase(txtFind.Text) Then Exit For
Next
If cboName.ListIndex = cboName.ListCount - 1 Then
For i = cboName.ListIndex To 1 Step -1
cboName.ListIndex = i
If Left(UCase(cboName.Text), Len(txtFind.Text)) = UCase(txtFind.Text) Then Exit For
Next
End If
If cboName.ListIndex = 1 Then cboName.ListIndex = lngCurr
End Sub