title: Search function (using dropdownlist) in asp.net and vb.net
body: <p>Is there a simple or example code where i can display a table/gridview when using a dropdownlist as search function (in asp.net with vb.net). I already created a table in the sql database (and have information in it). </p>
  
  <p>i just need search the value in the dropdownlist and when click the btnsearch, it will load the table. </p>
  
  <pre><code>    Private Sub LoadGridTbale(Optional sortExpression As String = "")
  
          Dim dt As DataSet
  
          dt = db.ExecuteSelect("SELECT StaffId, convert(varchar,dob,103) as dob, staff_name, staff_address," &amp; _
                          " mobile_no, department_no" &amp; _
                          "FROM emp_staff ")
  'i want to write the code here
  </code></pre>
  
  <p>I could not find any example search for it on asp.net with vb.net</p>
  
  <p>update </p>
  
  <pre><code>        dt = db.ExecuteSelect("SELECT staffId, convert(varchar,dob,103) as dob, staff_name, staff_address," &amp; _
                          " mobile_no, department_no" &amp; _
                          "FROM emp_staff WHERE staffId='" &amp; txtid.Text &amp; "' OR dob='" &amp; dob.text &amp; "' OR staff_name='" &amp; staff_name.SelectedValue &amp; "' OR staff_address='" &amp; add.text &amp; "' ")
  </code></pre>