More options for Cookie Provider?

  1. #1

    More options for Cookie Provider?

    Hi all,

    is there any way to access more configurations for the CookieProvider?

    I want to use the State for my grid, but I do not want the Cookie to persist across my entire website. I want the ability to set the expiry duration and the path of the cookie.

    This functionality is available in the ExtJS version, but how can I access this via Ext.Net? The ResourceManager only provides an Enum setting.
  2. #2
    Ok managed to find a workaround.

    In the codebehind, set the following in the code behind:
       this.myResourceManager.RegisterClientSpecialInitScript("xxx", "SetExtCookieProvider();");
    and define this on the page

    function SetExtCookieProvider() {		
    		var cp1 = new Ext.state.CookieProvider({
    				path: ROOT_PATH + "MyPath/",
    				expires: new Date(new Date().getTime() + (1000 * 60 * 60 * 24 * 10)) //10 days       
    			});
    		Ext.state.Manager.setProvider(cp1);
    }

Similar Threads

  1. [CLOSED] Cookie Provider - how to limit cookie size?
    By voipswitch in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Aug 12, 2011, 1:47 PM
  2. ASP.NET Membership Provider Problem
    By gayancc in forum 1.x Help
    Replies: 0
    Last Post: Jan 15, 2011, 8:47 AM
  3. asp.net membership provider
    By kikopico in forum 1.x Help
    Replies: 3
    Last Post: Mar 04, 2010, 7:00 AM
  4. manual installation in hosting provider
    By tkm in forum 1.x Help
    Replies: 2
    Last Post: Sep 20, 2009, 6:01 AM
  5. Cookie StateProvider
    By Timothy in forum 1.x Help
    Replies: 0
    Last Post: Jun 26, 2008, 6:02 PM

Posting Permissions