Set session-state Cookiemode property for click event?

189 views Asked by At

I know we can set UseUri Property of session state in Web.config but but what if I want to set it on click event or Page_Load?

I did the following but it didn't work:

protected void cmdLinkAbsolute_Click(object sender, EventArgs e)
    {
        bool b = Session.CookieMode == HttpCookieMode.UseUri;
        b = true;  
    }

The application use Deafult "UseCookie" mode.

How can we set this session property in click event?

0

There are 0 answers