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

[Solved] RadAlert fire from codebehind

3 Answers 311 Views
Window
This is a migrated thread and some comments may be shown as answers.
Luigi
Top achievements
Rank 1
Luigi asked on 07 Jan 2010, 05:05 PM
Hi guy,
  i read most message about this argument... i have try many solution without luck.

anyone have solved this problem?

I want fire one radalert window on page load in my c# code.

tnk's all

bye

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 08 Jan 2010, 06:52 AM
Hello Luigi,

Here is the code I tried for showing alert from code behind. It worked for me. Give a try with this.

CS:
 
    protected void Page_Load(object sender, EventArgs e) 
    { 
            string radalertscript = "<script language='javascript'>function f(){radalert('My Alert from code behind !', 330, 210); Sys.Application.remove_load(f);}; Sys.Application.add_load(f);</script>";  
            Page.ClientScript.RegisterStartupScript(this.GetType(), "radalert", radalertscript);  
    } 

Also checkout the knowledge base for more information about this:
Calling radalert from codebehind

Regards,
Shinu.
0
Luigi
Top achievements
Rank 1
answered on 08 Jan 2010, 08:17 AM
thank you !
work fine !
0
Svetlina Anati
Telerik team
answered on 08 Jan 2010, 08:46 AM
Hello Luigi,

I also suggest to examine the following blogpost which we have prepared for such cases:

http://blogs.telerik.com/blogs/posts/09-05-05/executing_javascript_function_from_server-side_code.aspx


Greetings,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Window
Asked by
Luigi
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Luigi
Top achievements
Rank 1
Svetlina Anati
Telerik team
Share this question
or