Private Sub LoadPage()
Dim strSQL As String = "SELECT * FROM JOB WHERE ID =" &
Dim cnn As New SqlClient.SqlConnection
Dim cmd As SqlCommand
Dim dr As SqlDataReader
cmd = New SqlCommand(strSQL, cnn)
dr = cmd.ExecuteReader
lblID.Text = dr("ID")
txtJobName.Text = dr("JobName")
txtJobDescription.Text = dr("JobDescription")
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
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.