按钮单击事件期间文本框变为清除 [英] Textbox getting Clear during button click event

查看:80
本文介绍了按钮单击事件期间文本框变为清除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Frnds,

我有多个文本框的表单。当我点击按钮时它变得清晰。输入的文字变得清晰。



谢谢

Suresh

Hi Frnds,
I have form with Multiple textboxes.when i clicking button its getting clear.entered text getting clear.

Thanks
Suresh

推荐答案

注释掉load / init事件中的所有内容。再试一次,然后纠正你在那里提出的任何错误。另外,检查是否有任何显式重置文本框内容。



将任何代码放在If Not PostBack块中的load / init事件旁边。如果没有,你可以重置文本框,如果你已经在那里放置代码来初始化文本框。



我希望这有帮助
Comment out everything in the load/init event. Try it again then correct whatever errors you are committing there. Also, check if there are any explicit resetting of the textbox contents.

Put any code in side your load/init event within the If Not PostBack block. If not, you may reset your textbox if you have put code there to initialize the textbox(es).

I hope this helps


如果您有修复值和任何其他整个值,并且在单击按钮单击事件时不必清除文本框,则另一种方法是使用ViewState使用客户端状态管理技术。因此,首先将整个值存储在viewstate中,执行load / init事件后,您还可以设置viewstate的值并将其用于textbox。
If you have a fix value and any other entire value and you have to not clear your textbox when clicking on button click event then another way is to use client side state management technique by using ViewState. So, first store the entire value in viewstate and after executing load/init event you can also set and use the value of viewstate to textbox.


必须有一些Java Script这样做这个。 Plz检查你的脚本文件。
There must be some Java Script kind of this doing this. Plz check your script file.


这篇关于按钮单击事件期间文本框变为清除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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