This is a migrated thread and some comments may be shown as answers.

Error with RadDatePicker Inside an UpdatePanel with modalPopUpExtender

5 Answers 222 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jorge
Top achievements
Rank 1
Jorge asked on 28 Feb 2012, 06:07 PM
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.

5 Answers, 1 is accepted

Sort by
0
Antonio Stoilkov
Telerik team
answered on 02 Mar 2012, 01:14 PM
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.
0
Jorge
Top achievements
Rank 1
answered on 06 Mar 2012, 03:22 PM
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.
0
Antonio Stoilkov
Telerik team
answered on 09 Mar 2012, 09:20 AM
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.
0
Jorge
Top achievements
Rank 1
answered on 14 Mar 2012, 07:34 PM
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.
0
Antonio Stoilkov
Telerik team
answered on 19 Mar 2012, 11:58 AM
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.
Tags
Ajax
Asked by
Jorge
Top achievements
Rank 1
Answers by
Antonio Stoilkov
Telerik team
Jorge
Top achievements
Rank 1
Share this question
or