按钮和文本框的问题 [英] problem with button and textbox

查看:81
本文介绍了按钮和文本框的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我选择网格行的时候我有网格n文本框,那时该值显示在文本框中,但是当我单击按钮时,在主母版页上,该时间文本框的值就在内容页中.文本框显示空白值?帮助我吗?

i have grid n textbox when i select grid row that time the value is displaying in textbox but when i click on button which in main master page that time textbox box value goes which is in content page .textbox disply blank value?help me?

推荐答案

使用Ajax部分回发.使用更新面板
use ajax partial postback. use update panel


在按钮单击触发后将文本框重新绑定到网格中.
您可以在绑定网格后编写以下代码
rebind the textbox in grid after button click fires...
you can write below code after binding grid
((TextBox)gridview1.HeaderRow.FindControl("tbSearch")).Text = "yourtext";


这篇关于按钮和文本框的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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