1
Answer

update gridview on keypress in textbox

Ask a question
omkar jante

omkar jante

14y
10.3k
1
hi friends...
i want to update the gridview on textchange in textbox....
if i press "a" the gridview should filled up with record starting with "a". i have some code

SqlDataSource1.SelectCommand = "select * from DeptMaster where DeptName like '" + TextBox1.Text + "%'";
        SqlDataSource1.SelectCommandType = SqlDataSourceCommandType.Text;
        GridView1.DataSource = SqlDataSource1;
        GridView1.DataBind();

its working while leaving the textbox but i want this code should execute on keypress event....

please check this site for example  www.way2sms.com  on the right u will see the quick contact search .... i want to do the same.....
please reply me soon....

Answers (1)