Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. searching using gridview

searching using gridview

Scheduled Pinned Locked Moved Database
csharpdatabasealgorithms
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kunal P
    wrote on last edited by
    #1

    hi i am developing a web based application usin c#. i wanted to perform some searching functionality in the website. i have laid down some fields such as Name, Age. now i want the user can perfrom a search on any of these parameters. eg. if he just wants to perform the search on name, he may or if he wants on bothe the params, he is able. how shud i do. in the sql i tried with AND. but for AND. you wud need to specify both the params..

    Kunal

    J 1 Reply Last reply
    0
    • K Kunal P

      hi i am developing a web based application usin c#. i wanted to perform some searching functionality in the website. i have laid down some fields such as Name, Age. now i want the user can perfrom a search on any of these parameters. eg. if he just wants to perform the search on name, he may or if he wants on bothe the params, he is able. how shud i do. in the sql i tried with AND. but for AND. you wud need to specify both the params..

      Kunal

      J Offline
      J Offline
      John L Ponratnam
      wrote on last edited by
      #2

      Hi, In using queies i can help u. eg: select * from tablename where (''='aaa' or Name='aaa') and (0=16 or Age=16) check it out with this query

      Regards, LEE

      K 1 Reply Last reply
      0
      • J John L Ponratnam

        Hi, In using queies i can help u. eg: select * from tablename where (''='aaa' or Name='aaa') and (0=16 or Age=16) check it out with this query

        Regards, LEE

        K Offline
        K Offline
        Kunal P
        wrote on last edited by
        #3

        hi thankx for replying.. but the querying is asking for both the parameters.

        Kunal

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups