| |||||
LoginView Control SyntaxASP.NET Syntax ASP.NET Syntax for Web Controls Uses templates to display varying content for a given user, based on the user's authentication status and role membership. For information on the individual members of this class, see LoginView in the class library. RemarksThe LoginView control displays different Web site content templates (or views) for different users, based on whether the user is authenticated and, if so, which Web site roles they belong to. Syntax ExampleThe following example shows how to set templates for each of the three template types that are supported by the LoginView control. <asp:loginview id="LoginView1" runat="server">
<anonymoustemplate>
Please log in for personalized information.
</anonymoustemplate>
<loggedintemplate>
Thanks for logging in
<asp:loginname id="LoginName1" runat="Server" />
.
</loggedintemplate>
<rolegroups>
<asp:rolegroup roles = "Admin">
<contenttemplate>
<asp:loginname id="LoginName2" runat="Server" />
, you
are logged in as an administrator.
</contenttemplate>
</asp:rolegroup>
</rolegroups>
</asp:loginview>
See AlsoLoginView Class LoginView Web Server Control |
| ||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme