asp.net - How to search record in database using gridview and two textboxes..using vb.net? -


i have 2 textboxes textbox1 , textbox2 , 1 gridview

i want site users may search record either entering city name in textbox1 or entering country name on textbox2 via gridview .

there's whole lot more information need answer in detail.

in general, need take values in textboxes, convert them sql query sent database , bind resultset returned gridview.

depending on data access mechanism you're using, how achieve varies - if don't know data access mechanism exist, i'd suggest start reading on linq-to-sql it's pretty easy use , safe against sql injection attacks.

if can provide more details of you're trying accomplish, may able further eg:

  • what version of .net framework using
  • what database software in use (microsoft sql server, mysql, oracle, etc.)
  • what tabl want search like? (what fields, etc)

Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -