IsAuthenticated (WebSecurity Ref)

The isAuthenticated property checks to see if the current users is authenticated. It returns true if the user is authenticated or false otherwise. It does not take any arguments.

Example

string msg = "";
 
if (WebSecurity.IsAuthenticated)
{
  msg = "Welcome " + WebSecurity.CurrentUserName;
}else
{
msg = "Welcome Guest";
}