开发者

LoginForm in MasterPage

开发者 https://www.devze.com 2023-02-20 22:54 出处:网络
please, how can I add LoginForm to MasterPage? I Added LoginForm Control to Mast开发者_开发技巧erPage, but when I try click to another button, Validators in LoginForm show alerts... How Can I fix it p

please, how can I add LoginForm to MasterPage? I Added LoginForm Control to Mast开发者_开发技巧erPage, but when I try click to another button, Validators in LoginForm show alerts... How Can I fix it please? :)


The Master Page is not generally the place for a login form. What are you trying to accomplish with this?

If you want a user to be able to login from any page that inherits from that master then I would put the login in .ascx control and drop that on the page. You should then be certain to add the tag "validationGroup" to those controls. (see Validation Grouping on http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.login.aspx)

Cheers, CEC


In addition to putting your login control into a user control, on the "other buttons" you click, you also need to set the property CausesValidation="False" if they aren't intended to trigger validation.

0

精彩评论

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

关注公众号