更改另一个文本框值后更新文本框值 [英] updating a textbox value after changing another textbox value

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

问题描述

有人可以帮我吗
asp.net中有4个文本框,即ta da hra和总计
如果我给出ta,da和hra的值,那么总会自动显示.我的查询是在执行上述操作后,如果我再次想要更改ta的值,那么总值应该自动更新.

can someone help me out
There are 4 textbox i.e ta da hra and total in asp.net
and if i give the value of ta,da and hra then the total is showed automatically.My query is after doing the above if i again want to change the value of ta then the total value should be updated automatically.So What will be the codebehind for that??

推荐答案

获取Textbox的TextChanged事件.
Take TextChanged Event of Textbox.




您可以执行一项功能来设置总计.在该功能中,您可以进行所有计算.将最终结果提供给Total文本框.然后在所有文本框更改事件中调用此函数.因此,如果更改了任何文本框值,则可以为total设置值.

希望您能明白.因此,为此做一个功能,之后您将无法获得答案,然后在此处发布代码.

谢谢,
Viprat
Hi,

You can make one function to set total. In that function you can do all calculations. Give the final result to Total textbox. Then call this function in all textbox chnged event. So you can set the value for total if any textbox value is changed.

I hope you will get the idea. So make one function for that and after that you will not get the answer then post the code here.

Thanks,
Viprat


这篇关于更改另一个文本框值后更新文本框值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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