是否有简单或示例代码,我可以在使用下拉列表作为搜索功能时显示表格/ gridview(在asp.net with vb.net中)。我已经在sql数据库中创建了一个表(并在其中包含信息)。
我只需要在下拉列表中搜索值,当点击btnsearch时,它会加载表格。
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," & _
" mobile_no, department_no" & _
"FROM emp_staff ")
'i want to write the code here
我在asp.net with vb.net
上找不到任何示例搜索更新
dt = db.ExecuteSelect("SELECT staffId, convert(varchar,dob,103) as dob, staff_name, staff_address," & _
" mobile_no, department_no" & _
"FROM emp_staff WHERE staffId='" & txtid.Text & "' OR dob='" & dob.text & "' OR staff_name='" & staff_name.SelectedValue & "' OR staff_address='" & add.text & "' ")