Error with RadDatePicker Inside an UpdatePanel with modalPopUpExtender

6 posts, 0 answers
  1. Jorge
    Jorge avatar
    7 posts
    Member since:
    Jan 2012

    Posted 28 Feb 2012 Link to this post

    Hi,

    Im creating a popup with the modalPopUpExtender (ajaxcontroltoolkit Version=3.0.30930.28736), for that im using a asp panel and inside them i got two raddatepicker, combobox, enclosing the panel i got a Updatepanel.. something like this:

    <updatepanel>
    <panel>
       <div>
        <raddatepicker1><raddatepicker2><radcombobox> 
       </div>
       <ajaxToolkit:ModalPopupExtender>
    </panel>
    <aspbutton> //to open the popup
    </updatepanel>

    The popup opens fine, but when a control fire an event like combobox selectedindexchaged or i close de popup i got this error:

    Server Error in '/' Application.
    Invalid JSON primitive: {"minDateStr":"2/28/2012 0:0:0","maxDateStr":"12/31/2099 0:0:0"}.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
     
    Exception Details: System.ArgumentException: Invalid JSON primitive: {"minDateStr":"2/28/2012 0:0:0","maxDateStr":"12/31/2099 0:0:0"}.
     
    Source Error:
     
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
     
    Stack Trace:
     
    [ArgumentException: Invalid JSON primitive: {"minDateStr":"2/28/2012 0:0:0","maxDateStr":"12/31/2099 0:0:0"}.]
       System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer) +543674
       System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) +37
       System.Web.Script.Serialization.JavaScriptSerializer.DeserializeObject(String input) +13
       Telerik.Web.UI.RadWebControl.LoadPostData(String postDataKey, NameValueCollection postCollection) +137
       Telerik.Web.UI.RadDatePicker.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +40
       System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +346
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743
     
     
    Version Information: Microsoft .NET Framework Version:2.0.50727.3625; ASP.NET Version:2.0.50727.3634

    I will appreciate your help.
  2. Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 02 Mar 2012 Link to this post

    Hello Jorge,

    You could try removing UpdatePanel or ModalPopupExtender controls and observe if the issue is related to the RadControls. I tried to replicate the issue which you described, but to no avail. Attached to this message, you will find the code which I used for testing. Please, take a look at it and let me know if there are any differences at your end, which I may be leaving out.

    All the best,
    Antonio Stoilkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Jorge
    Jorge avatar
    7 posts
    Member since:
    Jan 2012

    Posted 06 Mar 2012 Link to this post

    Hi Antonio,

    At firts i must say that you are using a different version of the AjaxControlToolkit, as i said before i am using: ajaxcontroltoolkit Version=3.0.30930.28736 

    Another thing i forgot was to say that my version of development is for Visual Studio 2008 frw 3.5 with RadWebUI version: 2010.2.713.35

    Maybe with that fixed info you can try your example again using the exactly version of the assemblies im using

    I will appreciate your help.
  4. Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 09 Mar 2012 Link to this post

    Hello Jorge,

    I have updated the assemblies and the .NET Framework version but still not able to replicate the issue. In order to further investigate and advise you with the best possible solution you could take a look at the project and describe what are the necessary steps for replicating the issue.

    Kind regards,
    Antonio Stoilkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Jorge
    Jorge avatar
    7 posts
    Member since:
    Jan 2012

    Posted 14 Mar 2012 Link to this post

    Hello Antonio,

    Sorry for this late response.

    I was looking and modifying your example for make it works, by that way i am sending you a VS2008 Solution with a webapplication project, you will find two pages:

    WebForm1: shows the error when you close de popup (using radcontrols).
    WebForm2: shows the same technique of opening and closing the popup with asp.net controls. So there is no error.

    I think something is happening  in the way I MUST open and close the popup, this is because i need to control what happen before opening and also after closing the popup.

    This is the link for download the file. Sorry for this, but i can not attach a file of 8MB.
    http://www.file4safe.com/yya77kp7i6ry

    I will appreciate your quick response.

    Update 15/03/2012:

    I tried to apply the "ajaxify" method of the radscriptmanager telling that the button updates de panel but i'm still getting the same error with datepickers.
  6. Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 19 Mar 2012 Link to this post

    Hi Jorge,

    Thank you for the provided project.

    I have tried to download the application from the URL but without success as it is shown in the video below. You could upload the project at another place and prove the new link.

    Kind regards,
    Antonio Stoilkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top