In this article you will learn, how to clear Session in JavaScript?
<style>
hidden { display: none; }
</style>
function ClearSession()
{
document.getElementById("btnHidden").click();
}
<asp:Button ID="btnHidden" runat="server" CssClass="hidden" OnClick="Button1sclear_Click" ClientIDMode="Static" />
protected void Button1sclear_Click(object sender, EventArgs e)
{
Session["id"] = null;
}
<ClientSideEvents CloseBtnClick="ClearSession()" />
How to clear Session in JavaScript?
minify code