简体   繁体   English

asp.net选项卡控件

[英]asp.net Tab Control

I have a tab control with 2 tabs, 1 tab that validates some controls and the other tab on button click will show me a gridview. 我有一个带有2个选项卡的选项卡控件,其中1个选项卡用于验证某些控件,而单击按钮时另一个选项卡将向我显示gridview。

The problem is that when I press the button, it validates the other tab. 问题是,当我按下按钮时,它将验证另一个选项卡。 How can I disable the validation on this tab and on the other tab the validation is enabled. 如何在此选项卡上禁用验证,在另一个选项卡上启用验证。

You can set controls up in a group and only validate that group. 您可以在组中设置控件,而仅验证该组。 FOr 4.0, this is easy (I believe this is actually 3.5 or maybe even 2.0?): http://msdn.microsoft.com/en-us/library/ms227424.aspx 对于4.0,这很容易(我相信这实际上是3.5甚至2.0?): http : //msdn.microsoft.com/zh-cn/library/ms227424.aspx

In older versionss of .NET, you can do something like this: http://www.codeproject.com/KB/aspnet/groupvalidator.aspx 在.NET的旧版本中,您可以执行以下操作: http : //www.codeproject.com/KB/aspnet/groupvalidator.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM