Adding Telerik Controls Dynamically into a Nested User Control

2 posts, 0 answers
  1. uzairtahir
    uzairtahir avatar
    1 posts
    Member since:
    Aug 2012

    Posted 29 Jan 2013 Link to this post

    I am trying to add Telerik’s controls (like RadMaskedTextBox, RadNumericTextBox and RadDateInput controls) dynamically into a user control (under the Page_Init event) which is itself a child of another user control.


    When I run the project, following exception occurred and nothing is shown in the user control.

    “Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors. Parameter name: element”


    However, these controls are added directly on a .aspx page without any exception and it appeared that the Telerik’s controls get registered in the Page_PreRenderComplete event of an .aspx page and since this event does not exist in a user control therefore they are throwing the above exception.

  2. Andrey
    Andrey avatar
    836 posts

    Posted 01 Feb 2013 Link to this post


    Could you share your UserControl full source code? Thus all the people who want to help you will have better understanding of your project.

    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