Hi, I am trying to do a search page by using a dropdownlist and a textbox.
The DDL has only two options, Name and Last Name. I want to be able to search the database by any of the 2 options and enter text in the textbox to search the DB. The results will be display using a datagrid after the submit button is hit.
I only got the DDL filled with the 2 options and can search only by the first option on the DDL. Don't know how to make the search by selecting the second option the DDL.
Any help or example will be very appreciated.
Thanks,
New developer
RakrusPosted Nov 6, 2007, 5:38 AM
Hi,
Your dropdown contains 2 items with name fileds Name & Last Name for these two name fields set the corresponding value fields
on button_Click
if dropdown selectd value = value corresponding to Last Name
search database by last name with the given text value
else
search database by name with the given text value
Thanks