Noonza,
To do a search in a database, all you have to do is create a user control like Datalist, DataGrid, or Repeater and bind it to the datasource. If you want to search for a keyword, create a textbox that posts to the server. When a user enters in the information and submits, it will post to the server, and the your code will tell the SQL command what to search for. Then you need to bind that datasource to your user control. On the front-end of your page, you will need to design your search results and how they will display.
Create a page with a form running at the server. Create the textbox and submit button. On the submit button, create an OnClick command that posts to a sub on the server. Something like this would look like
OnClick="btnSearch_Click"
Then in your "Sub btnSearch_Click(...)" you will have the code to search the database using SQL parameters and the LIKE with % symbols. Then after it does the search, check to see if it "hasrows" with "repeatername.HasRows". If it is true, bind to the datasource.
Now create your Datalist, DataGrid, or Repeater on the page with your design/layout in the ItemTemplate tags. Then run your page and you have your results.
Done.
SheSaidImaPregy
Veteran Poster
1,080 posts since Sep 2007
Reputation Points: 43
Solved Threads: 68