Skip to content
Loading
    
  •         
  •    @ViewData["Message"]    
  • }    
  •     
  •     
  •     @Html.ActionLink("Back to List", "Index")    
  •     
  •     
  • "~/Scripts/jquery-1.10.2.min.js">    
  • "~/Scripts/jquery.validate.min.js">    
  • "~/Scripts/jquery.validate.unobtrusive.min.js">    
  • Index.cshtml
    1. @{    
    2.     ViewBag.Title = "Index";    
    3. }    
    4. Index

          
    5. Welcome @HttpContext.Current.User.Identity.Name    
    6. @if (Request.IsAuthenticated)    
    7. {    
    8.     using (Html.BeginForm("Logout","Home", FormMethod.Post, new { id="logoutForm"}))    
    9.     {    
    10.         "javascript:document.getElementById('logoutForm').submit()">Logout    
    11.     }    
    12. }