I am using MVC session variable in Razor view javascript. But if I want set that session value to null how to do that?

 function UpdateMembershipJavascriptObject() {
        var tempMembership = @Html.Raw(JsonConvert.SerializeObject(Session["Membership"]));
        if (tempMembership) {

            //here I set to null

I tried '@Session["Membership"]' = null but getting error on = null on the browser.

Related posts

Recent Viewed