Automatically Hiding the Login
Control from Authenticated Users
Some websites display a login form at the top of every page. That way, registered users can log in at any time to view additional content. The easiest way to add a Login
control to all the pages in an application is to take advantage of Master Pages. If you add a Login
control to a Master Page, the Login
control is included in every content page that uses the Master Page.
You can change the layout of the Login
control by modifying the Login
control’s Orientation
property. If you set this property to the value Horizontal
, the Username and Password text boxes are rendered in the same row.
If you include a Login
control in all your pages, you should also modify the Login
control’s ...
Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.