1. We have moved to a new forum! There may be a few things not working properly so please let us know if you find a bug. Remember to use the bbCode [ sql ] tag for SQL statements.

loading gridview on textchanged event

Discussion in 'SQL - Questions and Answers' started by waqas.uet, Dec 4, 2007.

  1. waqas.uet New Member

    i have a "textBox" and a gridview

    now i want to create query on textBox's textchanged event

    for example

    i have a table "Employee" which contains the field "EmployeeNAme".
    now i want to make query in such a way that. when ever i insert any character in the textbox the query give me the EmployeeName from the database to the gridview.

    like

    if i have a employee names (Aslam, AKram) both starting with A
    now if i write A in the textbox the grid changes and displays both names from the database.

    if hope u will have got ma question.
    thanks in advance

    plese reply me..i m new to this..
  2. Unregistered Guest

    In textbox's textchanged event write this query

    "Select EmployeeName from Employee where EmployeeName like '" + TextBox1.Text + "%'";

Share This Page