Jscript runtime error on postback in ajaxified dynamically loaded user controls in a RadMultiPage of RadTabStrip

5 posts, 0 answers
  1. Kirpa
    Kirpa avatar
    1 posts
    Member since:
    Apr 2011

    Posted 28 Apr 2011 Link to this post


    I've a master page that contains RadScriptManager, a default.aspx page that contains a RadTabStrip and a RadMultiPage. I've an Xml file that defines a collection of user controls with each element defining attributes of the control. In the Page_Load method of Default.aspx.cs, I'm dynamically generating a RadTab and and a PageView for each control definition in the Xml file (controls are exactly same except that they are bound to different server/databases to support various groups). I'm able to succesfully generate RadTab for each control. However when I click any of the controls in the loaded user control (e.g. a ListBox selection change), I end up getting a Jscript error in VS 2010 that says:

    Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Value cannot be null.
    Parameter name: source

    I've tried everything that I could think of such as loading the controls on Page_Load (outside and inside !IsPostBack), setting autopostback of TabStrip to true, to no avail. I'm not able to hit the code in the project at all since the JScript error is thrown before that. BTW if I use an asp:placeholder and generate the controls inside a table and add them to placeholder everything works fine. This has something to do with RadTabStrip and RadMultiPage combination.

    Could you please suggest what could be the reason for seeing this issue?

  2. Peter
    Peter avatar
    6637 posts

    Posted 04 May 2011 Link to this post

    Hi Kirpa,

    There is an online demo - Load on Demand RadPageView which might help you with this requirement. Can you try using this approach if your current implementation is fundamentally different from this.

    Kind regards,
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. Jack
    Jack avatar
    4 posts
    Member since:
    Feb 2011

    Posted 04 May 2011 Link to this post

    I've seen that happen before when the ajaxified controls didn't have their ID set.  You might double check that.
  4. Donald Bickel
    Donald Bickel avatar
    1 posts
    Member since:
    Nov 2006

    Posted 08 Nov 2011 Link to this post

    The demo didn't solve a very similar issue for me. Is there a code sample on how to call server with AjaxManager in scenario where Tabs and PageViews where generated on pageload?

    Thank you
  5. Peter
    Peter avatar
    6637 posts

    Posted 11 Nov 2011 Link to this post

    Hi Donald,

    If you experience problems with this scenario, please open a support ticket and send us a simple demo of the issue.

    Kind regards, Peter
    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