radalert on page load

3 posts, 0 answers
  1. geetha priya
    geetha priya avatar
    25 posts
    Member since:
    May 2010

    Posted 11 Nov 2010 Link to this post

    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. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 11 Nov 2010 Link to this post

    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.
  3. geetha priya
    geetha priya avatar
    25 posts
    Member since:
    May 2010

    Posted 11 Nov 2010 Link to this post

    Thanks  a lot .
    it works fine..
Back to Top