开发者

LoginForm in MasterPage

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜