文本框的文本更改事件不会触发Gridview DataBind() [英] Text Change event of textbox to doesn't fire Gridview DataBind()

查看:81
本文介绍了文本框的文本更改事件不会触发Gridview DataBind()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个serach页面,我有一个用于搜索的文本框和一个用于绑定所有serached数据的gridview,但问题是我无法根据文本更改绑定gridview。仅在选择文本值时绑定这并不完美。任何人都可以帮助我,谢谢

i want to create a serach page ,i have one textbox for search and one gridview for bind all serached data ,but problem is that i am not able to bind gridview according text change .it only binding on when select text value, which is not perfect. can anyone help me ,thankyou

推荐答案

为文本框添加AutoPostback =true,并在处理程序上根据输入的文本获取数据并绑定到网格。 $>


或者使用更新面板包装网格并将Trigger设置为文本框的文本更改事件以及Autopostback为真
Add AutoPostback="true" for the textbox and on handler get the data based on text entered and bind to the grid.

Or else use update panel to wrap the grid and set the Trigger to the textbox's text changed event along with Autopostback as true


这篇关于文本框的文本更改事件不会触发Gridview DataBind()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆