更新面板中的验证问题? [英] problem in validation in update panel?

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

问题描述

我在更新面板中有一个文本框和一个按钮"Button1".在"Button1"的按钮单击孔上,它仅应验证updatepanel内部的文本框.

接下来,

我在Updatepanel之外还有另外两个texboxes和一个按钮"Button2",并且在"Button2"的按钮单击事件上,它应该验证更新面板外部和内部的所有文本框.


在此先感谢您的建议.

I have a textbox and a button "Button1" inside an update panel. On button click vent of "Button1" , it should only validate textbox which inside updatepanel.

Next,

I have another two texboxes and a button "Button2" outside the Updatepanel and on button click event of "Button2", it should validate all the textboxes which is outside as well as inside the update panel.


Thanks in advance for the suggestion.

推荐答案

http://www.c-sharpcorner.com/UploadFile/DipalChoksi/valgrp_asp20_dc09212006132516PM/valgrp_asp /a> [^ ]
Validating partial page with ASP.NET Validators using JavaScript[^]
http://www.c-sharpcorner.com/UploadFile/DipalChoksi/valgrp_asp20_dc09212006132516PM/valgrp_asp20_dc.aspx[^]


如果您使用的是Javscript,请在​​Button1和Button2的单独函数中编写验证代码.然后,分别为Button1和Button2调用javascript函数.
If you are using Javscript, write your validation code in separate function for Button1 & Button2. Then, Call the javascript function separately for Button1 & Button2.



我通过对两个button_click事件都使用Validate方法获得了解决方案.
Hi,
I got the solution by using Validate Method on both the button_click event.


这篇关于更新面板中的验证问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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