Search code examples
extjscookiesextjs2

How to access cookies in ExtJS which were set from aspx.cs page


I have some aspx and some ExtJS pages in a project.

On an aspx page, cookie is set in code behind as follows

Response.Cookies["MYCOOKIE"].Value = "somevalue";

From this page user is redirected to an EXTJS page

Now on this new page, I want to get this "MYCOOKIE" value.

I tried-

var params = Ext.util.Cookies.get('MYCOOKIE'); // Gives error TypeError: Ext.util.Cookies is undefined

Any help would be appreciated

I am using EXTJS 2.3.0


Solution

  • I found the answer

    document.cookie