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

[Solved] (Rad)ScriptManager Error Visual Studio 2010 Beta 2

5 Answers 239 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Allen
Top achievements
Rank 1
Allen asked on 31 Oct 2009, 04:36 PM
Hi all,

Using Q1 2009 of Telerik RadControls for ASP.NET AJAX. I recently upconverted a web application to VS 2010 Beta 2 format (and ASP.NET 4.0). While it was generally successful and the application runs, I am experiencing an error which seems very difficult to get around. Hoping to get some feedback to see if anyone else has encountered it and if so, how resolve - or should I abandon for now and revert back to VS 2008/ASP.NET 3.5?

What is happening is this: I have a ScriptManager (or RadScriptManager - same issue) on a Master Page. On "some" content pages, not all, I encounter the following Javascript error when posting back from any control:
 
Line: 14816
Error: Object doesn't support this property or method

Then, if I choose to debug, the error occurs at the last line of this code block (14816):
  

},_removeDropDown:function(){ 
var _3c=this.get_dropDownElement().parentNode; 
_3c.parentNode.removeChild(_3c);
if(this._disposeChildElements&&typeof   
(Sys.WebForms)!="undefined"){ 
Sys.WebForms.PageRequestManager.getInstance()._destroyTree(_3c);

Following some leads, I have been able to work around the error on some pages by declaring the ScriptManager "closer" to the page that uses it - basically, "hiding" or removing the ScriptManager on the MasterPage and replacing it with one on the content page. BTW, if you try to do this, you'll find that while you can easily add a ScriptManager programmatically, it's quite difficult to remove one, since it's resistant to Controls.Remove(), ControlsRemoveAt(), .Visible, etc. The solution which has worked for me is to place the ScriptManager in a ContentPlaceHolder on the Master Page, "blank" it out on the content page using an empty ContentPlaceHolder, then programmatically add a new ScriptManager in Page_Init. (Yes, a hack, I know.)

However, placing the ScriptManager on the content page only works for some of the pages! In addition, in more complex content pages with nested user controls (e.g. a UC with a RadGrid, which then also hosts a UC for the edit form), I can't determine where/when exactly to add the ScriptManager to satisfy all the controls; some of them can't find it and exception out.

I have tested this on a stripped down project which just 1 Master Page + 1 content page. If I place the ScriptManager on the Master Page, I get the error. If I wipe out the ScriptManager on the Master Page and then re-add it in Page_Init of the content page, it works fine without errors, and I get AJAX partial page postback functionality.

Lastly, I have tried using the Q3 2009 version (trial) and I get the same error.

Any advice appreciated! Thanks,

Allen

5 Answers, 1 is accepted

Sort by
0
Allen
Top achievements
Rank 1
answered on 03 Nov 2009, 04:26 PM
Hi everybody, any feedback or advice?

If this is just where things stand right now, it's cool (VS 2010 is still in [late] beta after all). Just wondering if there's any way to work around at present, as I am liking the changes and overall "feel" of VS 2010 so far. But if I have to sit tight for a few and continue main development work in VS 2008, no problem.

Thanks,

Allen
0
Daniel Burton
Top achievements
Rank 1
answered on 08 Nov 2009, 08:52 PM
I have the same issue - any news from Telerik?
0
Allen
Top achievements
Rank 1
answered on 09 Nov 2009, 04:14 PM
Daniel,

Alas, none so far.

However, from what I've been able to glean from somewhat related threads in other forums, this appears to be "expected" behavior that Telerik is aware of. Assemblies haven't been formally ratified for ASP.NET (or simply .NET) 4.0 use, and some issues are reportedly caused by VS 2010 itself, which is still in beta after all.

Allen
0
Ivo
Telerik team
answered on 12 Nov 2009, 12:34 PM
Hi,

Sorry for showing up late here.
We will need some more time to research the cause of the problem. We are working on a few compatibility items together with some devs at Microsoft and we will make sure any reports get the necessary attention.

Thanks for bringing this up.

Regards,
Ivo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
T. Tsonev
Telerik team
answered on 26 Nov 2009, 06:11 PM
Hi Allen,

We were able to determine the cause of the issue and to fix it. The fix will be available in the next internal builds starting from version 2009.3.1126. We usually upload them every few days and it should appear in your Client.NET accounts by Monday.

Allen, thanks for spotting this issue. As a token of our gratitude for your involvement, your Telerik points have been updated.

All the best,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Allen
Top achievements
Rank 1
Answers by
Allen
Top achievements
Rank 1
Daniel Burton
Top achievements
Rank 1
Ivo
Telerik team
T. Tsonev
Telerik team
Share this question
or