A
AR
I am interested in the best approach for placing a LoginStatus control
in a Master page. The reason I'm doing this is so I can always display
the "Login" or "logout" link at the top of every page on my site.
However, this control needs to be placed inside a <form runat=server>
which means that any other page using this as their masterpage cannot
include a <form runat=server> tag because only one can ever be on a
page.
The easy approach is to place a <form runat=server> tag in my
masterpage surrounding the entire body and never include it in any
child pages, but this seems like overkill. Is there a better way to do
this? Is placing this control (or any other control that runs within a
form) on a masterpage discouraged?
<asp:LoginStatus
runat=server
LoginText="Click here to login"
LogoutText="Click here to logout"
LogoutAction=Redirect
LogoutPageUrl="~/default.aspx" />
Thanks in advance.
in a Master page. The reason I'm doing this is so I can always display
the "Login" or "logout" link at the top of every page on my site.
However, this control needs to be placed inside a <form runat=server>
which means that any other page using this as their masterpage cannot
include a <form runat=server> tag because only one can ever be on a
page.
The easy approach is to place a <form runat=server> tag in my
masterpage surrounding the entire body and never include it in any
child pages, but this seems like overkill. Is there a better way to do
this? Is placing this control (or any other control that runs within a
form) on a masterpage discouraged?
<asp:LoginStatus
runat=server
LoginText="Click here to login"
LogoutText="Click here to logout"
LogoutAction=Redirect
LogoutPageUrl="~/default.aspx" />
Thanks in advance.