vendredi 15 janvier 2016

Logoff Action Not Being Hit

Salaamun Alekum

I Have A MVC Action Of LogOff Which Is Not Being Hit By Form Using JavaScript My View Page Do Get Refresh On Form Submit But The Action Is Not Being Hit ( It Tried To Check Via Placing A Break Point For Debugging Inside LogOff() Action

This Is Portion Of Partial View (Full Partial View Can Be Found In Previous Edit Of This Post

    using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right navbarText" }))

    <ul class="nav navbar-nav navbar-right">
            @Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" })
        <li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li>

This Is My LogOff Action

        public ActionResult LogOff()
            Session["LoggedInPersonId"] = null;
            return RedirectToAction("Index", "Home");

I Need Guidance On This

Thank You

Aucun commentaire:

Enregistrer un commentaire