开发者

asp.net Tab Control

开发者 https://www.devze.com 2023-03-03 04:26 出处:网络
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.

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.

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 vali开发者_如何学Pythondation 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

In older versionss of .NET, you can do something like this: http://www.codeproject.com/KB/aspnet/groupvalidator.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消