Author: sagngh9 | Posted on: 4/26/2010 6:18:18 AM | Views : 1323

Hi Everyone,
I am facing one problem when i am using asp.net membership in asp.net mvc.Even though i am getting logged in and able to access the resource my login status remain as log on(instead of logoff).Following is the code snippet for displaying the logon status.


<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%
    if (Request.IsAuthenticated)
    {
%>
        Welcome <b><%= Html.Encode(Page.User.Identity.Name) %></b>!
        [ <%= Html.ActionLink("LogOff", "LogOff", "Account") %> ]
<%
    }
    else
    {
%>
        [ <%= Html.ActionLink("Log On", "LogOn", "Account") ...

Go to the complete details ...