Update the Login Control

Total Post:8


 2316  View(s)
Rate this:
How to update the Login control to display Login user details once logged in successfully.i.e. once Login into the Login form Login control should be changed as Logoff control and diplay the Login username details
  1. Re: Update the Login Control


    You can create user control to change the login to logoff.
    For eg.

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

    You can also refer demo mvc application provided default in visual studio.

      Modified On Mar-29-2018 04:45:07 AM


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.