Click to See Complete Forum and Search --> : search on dataBase ?


honeyboy_20
August 26th, 2007, 04:59 PM
hi ,
i want to make page which contains textBox and user write any word to search in dataBase and if word is found it will returned colored yellow how i can make such this ?

Shuja Ali
August 27th, 2007, 03:13 AM
Write the code to search the database and once the records are found, change the backcolor of the textbox to yellow.

honeyboy_20
August 27th, 2007, 07:11 AM
thanks , i want code to do something like this (code for search and coloring words).

Shuja Ali
August 27th, 2007, 07:24 AM
thanks , i want code to do something like this (code for search and coloring words).
Well writing code will not be possible. You will have to write it yourself. Show us what you have done so far.

You will have to use ADO.NET. Take a look at MSDN what ADO.NET is and how you can use it.

honeyboy_20
August 27th, 2007, 09:21 AM
Well writing code will not be possible. You will have to write it yourself. Show us what you have done so far.

You will have to use ADO.NET. Take a look at MSDN what ADO.NET is and how you can use it.

i know ado but i want the way ?

Shuja Ali
August 27th, 2007, 09:45 AM
Here is the way:

Get the value of Text box
Open a connection to the database.
Create the SQL using the value of the text box.
Open a DataReader or Dataset depending on what you have to do with the data retrieved.
Close the connection.