Asp retiveing records from from SQl using Search box

Discussion in 'C#' started by leon25, Oct 27, 2009.

  1. #1
    How to retrieve the records using search box ASP net


    If any one knows share it here :
     
    leon25, Oct 27, 2009 IP
  2. exploit

    exploit Member

    Messages:
    129
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #2
    buddy simple just use like query :)
     
    exploit, Oct 27, 2009 IP
  3. wren

    wren Guest

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    use a sql query, on my site i use linq to sql, its really fast
     
    wren, Oct 29, 2009 IP
  4. leon25

    leon25 Peon

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I know retrieving the data using query but I want to know how retrieve the using Search box:


    My concept is: If i enter data in textbox and it matches value of records in SQL

    I need to retrive the rest records

    If textbox1.text = dr["nam"]
    Then

    Textbo4.text= "sdfdsfs"

    Like that
     
    leon25, Nov 2, 2009 IP
  5. yugolancer

    yugolancer Well-Known Member

    Messages:
    320
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #5
    I am afraid your explanation is not very understandable. Please provide more info if you want that people help you out.

    You search using the query as follows:

    SELECT FROM MyTable WHERE FieldOne LIKE '%' + SearchTextBox.Text + '%'

    Now if it returns anything you want to do what? Please Elaborate!
     
    yugolancer, Nov 5, 2009 IP
  6. makeitlive

    makeitlive Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    do you want something like autocomplete, where suggestions will be displayed once you type few characters in the textbox or a simple solution...once you press button "SEARCH" then it executes the query ?
     
    makeitlive, Dec 21, 2009 IP