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

Can you make a radAlert popup on a .ascx page when the page loads?

1 Answer 136 Views
Window
This is a migrated thread and some comments may be shown as answers.
Acadia
Top achievements
Rank 1
Iron
Acadia asked on 08 Apr 2009, 07:18 PM
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

1 Answer, 1 is accepted

Sort by
0
Shaun Peet
Top achievements
Rank 2
answered on 08 Apr 2009, 11:03 PM
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.
Tags
Window
Asked by
Acadia
Top achievements
Rank 1
Iron
Answers by
Shaun Peet
Top achievements
Rank 2
Share this question
or