如何查找文本框的文本是否被更改? [英] how to find whether text of a text box is changed?..
本文介绍了如何查找文本框的文本是否被更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我在按钮单击处理程序中使用if-else语句.如果两个文本框中的任何一个的值都发生更改,我想运行一个更新查询.如何从代码隐藏中得知文本框的值是否已更改?...
谢谢
Amit
Hey everyone,
I am using an if-else statement inside a button click handler.I want to run an update query if value of any of the two textboxes is changed.How can i know from codebehind that whether textbox value is changed or not?...
Thanks
Amit
推荐答案
if(TextBox1.Text==//value from db)
{
//no change
}
else
{
//Update query.
}
这篇关于如何查找文本框的文本是否被更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文