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

Using a RadWindow inside a UserControl

1 Answer 73 Views
Window
This is a migrated thread and some comments may be shown as answers.
Stephan
Top achievements
Rank 1
Stephan asked on 13 Jul 2009, 04:56 PM
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.

1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 15 Jul 2009, 02:54 PM
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.

Greetings,
Fiko
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.
Tags
Window
Asked by
Stephan
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Share this question
or