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

radalert on page load

2 Answers 166 Views
Window
This is a migrated thread and some comments may be shown as answers.
geetha priya
Top achievements
Rank 1
geetha priya asked on 11 Nov 2010, 11:09 AM
Hi!

In my page i want to check one condition and want to give one rad alert on page load.

on buttons click it works but on page load it does not.

How can i give rad alert on page load?

thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 11 Nov 2010, 11:50 AM
Hello Geetha,


The following code snippet helped me to show radalert from code.

C#:
protected void Page_Load(object sender, EventArgs e)
{
        string radalertscript = "<script language='javascript'>function f(){radalert('Welcome to active forums !', 330, 210); Sys.Application.remove_load(f);}; Sys.Application.add_load(f);</script>"
        Page.ClientScript.RegisterStartupScript(this.GetType(), "radalert", radalertscript); 
}

For more info:
Calling radalert from codebehind
Executing JavaScript function from server-side code


-Shinu.
0
geetha priya
Top achievements
Rank 1
answered on 11 Nov 2010, 12:08 PM
Thanks  a lot .
it works fine..
Tags
Window
Asked by
geetha priya
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
geetha priya
Top achievements
Rank 1
Share this question
or