RadPanel & cookie

2 posts, 0 answers
  1. o.courtois
    o.courtois avatar
    13 posts
    Member since:
    Jul 2007

    Posted 21 May 2008 Link to this post

    Hello, i would like to upgrade my production site with the last telerik version. But, the Radpanel cookie format has changed.
    In a old version, when a user has clicked on a menu item, the cokie looks like this:

    {"SelectedItem":"ctl00_LoginView2_Menu1_RadPanelbarMenu_p2_p1_p1","ExpandedItems":"ctl00_LoginView2_Menu1_RadPanelbarMenu_p1,ctl00_LoginView2_Menu1_RadPanelbarMenu_p2,ctl00_LoginView2_Menu1_RadPanelbarMenu_p2_p1,ctl00_LoginView2_Menu1_RadPanelbarMenu_p3,ctl00_LoginView2_Menu1_RadPanelbarMenu_p4"}

    in the last version ( 2008.1.515.35 ) the cookie looks like this:

    {"SelectedItems":["2:1:1"],"ExpandedItems":["1","2:1","2","3","4"]}

    The probleme is, when a user with the old cookie come back to my new site version, i have an exception
    <StackTrace>   à System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object&amp; convertedObject)  
       à System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object&amp; convertedObject)  
       à System.Web.Script.Serialization.ObjectConverter.AssignToPropertyOrField(Object propertyValue, Object o, String memberName, JavaScriptSerializer serializer, Boolean throwOnError)  
       à System.Web.Script.Serialization.ObjectConverter.ConvertDictionaryToObject(IDictionary`2 dictionary, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object&amp; convertedObject)  
       à System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object&amp; convertedObject)  
       à System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object&amp; convertedObject)  
       à System.Web.Script.Serialization.ObjectConverter.ConvertObjectToType(Object o, Type type, JavaScriptSerializer serializer)  
       à System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)  
       à System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input)  
       à Telerik.Web.UI.RadPanelBar.LoadState(String state)  
       à Telerik.Web.UI.RadPanelBar.LoadStateFromCookie()  
       à Telerik.Web.UI.RadPanelBar.OnPreRender(EventArgs e)  
       à System.Web.UI.Control.PreRenderRecursiveInternal()  
       à System.Web.UI.Control.PreRenderRecursiveInternal()  
       à System.Web.UI.Control.PreRenderRecursiveInternal()  
       à System.Web.UI.Control.PreRenderRecursiveInternal()  
       à System.Web.UI.Control.PreRenderRecursiveInternal()  
       à System.Web.UI.Control.PreRenderRecursiveInternal()  
       à System.Web.UI.Control.PreRenderRecursiveInternal()  
       à System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)</StackTrace> 

    how can i resolve this ?

  2. Rosi
    Admin
    Rosi avatar
    2529 posts

    Posted 23 May 2008 Link to this post

    Hi ,

    The way cookies are saved was changed during the process of migration of RadPanelBar to Telerik.WEb.UI suite.

    Unfortunately there is nothing we can suggest as a workaround for this problem. You can override PreRender event of RadPanelBar use there try -catch-block to prevent showing the error .

    We apologize for the inconvenience this causes to you.

    Regards,
    Rosi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top