Using a RadWindow inside a UserControl

2 posts, 0 answers
  1. Stephan
    Stephan avatar
    71 posts
    Member since:
    Jul 2007

    Posted 13 Jul 2009 Link to this post

    Hi, I was wondering if the following is best practice. I have a textbox and next to the textbox I have a button. When I click the button I popup a radwindow which will return some values onClosing. This is all working fine. However I encounterd problems when I added multiple of these usercontrols to my page. On the page I added a RadWindowManager which is necessary for the Radwindow on the usercontrol. The problem is I have written javascript inside the usercontrol which handles the events for the window. This means I have the same piece of javascript rendered for each UserControl on the page. Well I sign the javascript functions with uniqueID's otherwise it is not possible the set or retrieve values. All eventhandling is executed clientside.

    My main question is, is this good practice? Or does someone have a better solution? For example store the necessary JS-functions in an external file and reference this file on the page. Hope I made it clear what the problem is, a lot of scripts on the page.
  2. Fiko
    Fiko avatar
    1406 posts

    Posted 15 Jul 2009 Link to this post

    Hello Stephan,

    The issue that you experience when a several instance of an user control are added to the same page is a common programming problem in ASP.NET. In such scenarios I could suggest the same solution like yours.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top