开发者

How can we use validation controls in a master page in asp.net

开发者 https://www.devze.com 2022-12-18 01:41 出处:网络
How can we use validation controls in a master page. The master page ha开发者_运维知识库s some server controls and some html controls. Now if we place the validations controls on master page would it

How can we use validation controls in a master page. The master page ha开发者_运维知识库s some server controls and some html controls. Now if we place the validations controls on master page would it effect the child page as well. I read about validation controls and master pages from my own blog.


(Why do you want the validation in the master page?)

A better design choice is to put the validation controls together with the controls you want to validate.

If the controls are on the master page, then you can put validation controls in the master page. If they are on a page using the master page, put them there.

I suggest to make use of user controls. Group the actual control together with the validation control. This would give you much better control over your layout and validation. And as a bonus it's reusable.

0

精彩评论

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

关注公众号