Displaying the authentication status in ASP.NET : Authentication « Development « ASP.Net






Displaying the authentication status in ASP.NET

<%@ Page Language="vb" %>
<html>
   <head>
      <title>Displaying the authentication status in ASP.NET</title>
   </head>
<body>

<p>

<%
   Dim boolAuth As Boolean

   boolAuth = Request.IsAuthenticated

   If boolAuth Then
      Response.Write("User " & Page.User.Identity.Name & " is authenticated.")
   Else
      Response.Write("Current user is not authenticated.")
   End If
%>

</p>

</body>
</html>
           
       








Related examples in the same category

1.User.Identity.IsAuthenticated (VB.net)
2.User.Identity.Name (VB.net)
3.Context User Identity Name (VB.net)
4.Get current user name and Authentication Type (VB.net)
5.Basic Authentication (C#)
6.Form based login (C#)
7.Form and database based authentication (C#)