通过一页中的两个按钮进行验证. [英] validation with two buttons in one page.

查看:92
本文介绍了通过一页中的两个按钮进行验证.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

1.我有一个表格,该表格带有母版页.
因此,我在此页面中解释了一个表,其中包含一些名称,城市,数字等字段,并且它是必填项.

2.现在,我还在母版页上定义了一个带有某些字段的表,这也是必填项.

所以,现在在我的一页中,有两个表(字段),当我在一个表中定义验证时,第二个表(在母版页中也是强制性的)在这种情况下
如何在两个表中使用验证.


谢谢,

Hello,

1. i have one form and this form with master page.
so, this page in i explained one table with some fields like name,city,number etc, and it''s mandatory.

2. now, also i defined one table with some fields on master page and it''s also mandatory.

so, now in my one page, two tables(fields) are there, when i defined validation in one table, so 2nd table, which in master page it''s also mandatory, in this case
how can i use validation in two tables.


Thanks,

推荐答案

请参阅下面的文章

http://msdn.microsoft.com/en-us/library/ms227424 (v = vs.100).aspx [
refer below article

http://msdn.microsoft.com/en-us/library/ms227424(v=vs.100).aspx[^]




请为此使用验证组属性.

例如,第一个表控件具有验证组地址",而提交按钮也具有验证组地址",那么当您在那时单击按钮时,它将验证那些控件,整个验证组为地址" '.

对于第二个表控件,您可以使用另一个验证组,如详细信息".

请参阅以下链接中的示例.这可能对您有帮助,您会明白的.

http://www.w3schools.com/aspnet/prop_webcontrol_button_validationgroup.asp [
Hi,

Please user the Validation Group property for that.

For Example, 1st table control has validation group ''address'' and that submit button has also validation group ''address'' then when you click on button at that that time it will validate those controls whole validation group is ''address''.

For the second table controls you can user another validation group like ''Details''.

see the example in the below link. It might be help you and you will get the idea.

http://www.w3schools.com/aspnet/prop_webcontrol_button_validationgroup.asp[^]

Thanks,
Viprat


朋友,

使用其他验证组

参考:

1.
http://www.aspsnippets.com/Articles/Validate-Multiple-Validation-Groups-with-One-Button-in-ASPNet.aspx [在ASP.NET中同时验证客户端和服务器端的多个验证组 [ ^ ]

问候,
Karthik.J
friend,

Use different validation group

Reference:

1.http://www.aspsnippets.com/Articles/Validate-Multiple-Validation-Groups-with-one-Button-in-ASPNet.aspx[^]

2.Validate multiple Validation group both client and server side in ASP.NET[^]

Regards,
Karthik.J


这篇关于通过一页中的两个按钮进行验证.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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