-
Acadia
211
posts
Member since:
May 2005
Posted 08 Apr 2009
Link to this post
Using Javascript, is there a way to do this? Every time the .ascx page loads I want to use Javascript to popup a radAlert box.
This .ascx has no form or body.
Thanks
-
-
571
posts
Member since:
Aug 2004
Posted 08 Apr 2009
Link to this post
Unless I've missed something, .ascx files must exist within an .aspx page at some point in order to be displayed in a browser. So, the .aspx page will have to have a form in order to use the RadControls for ASP.NET AJAX, and that's where you should put a RadWindowManager. So, on your .aspx page:
<telerik:radwindowmanager runat="server" id="RadWindowManager1" />
And in your .ascx page add the following script:
Sys.Application.add_load(alertTheUser);
function alertTheUser() { radalert('Hello World'); }
Which will use the RadWindowManager from the .aspx page. Hope that helps,
Shaun.
-