Asp.Net Membership: Set url to the login page

The loginstatus control doesn't have a property to set the url of the login page. You need to set this URL in the web.config of your application.

Insert the login URL between the authentication node of the web.config. So it looks like this

[code:c#]

<authentication mode="Forms">
 <forms loginUrl="~/pages/login.aspx" />
</authentication>

[/code]

Change the value of the loginUrl to your login page.

Leave a Reply

Your email address will not be published.