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

RadWindow & Radalert from user-control

1 Answer 75 Views
Window
This is a migrated thread and some comments may be shown as answers.
Waleed Seada
Top achievements
Rank 2
Waleed Seada asked on 16 Dec 2009, 08:57 PM
Dear All,

I want to be able to open either radwindow & radalert or radconfirm from a method on a user-control (codebehind).
I went through all the posted threads but just can't get it to work unless I put the following code:
ScriptManager.RegisterStartupScript(Page, typeof(Page), "RadAlertScript""Sys.Application.add_load(function(){radalert('XML Values Loaded Succesfully!!');});"true); 
I just don't wanted that way, I need to have a method that takes the title & message so I try the following :
protected void ShowAlert(string msg)  
{  
string myScript = string.Format("Sys.Application.add_load(function(){radalert('A string', 200,300,'{0}');})",msg);  
Page.ClientScript.RegisterStartupScript(this.GetType(), "SCR", myScript, true);  
}    
 
which I took it from a previous post, but it has a syntax error. and didn't work for me.

and what is the scenario for radwindow.

best regards
Waleed

1 Answer, 1 is accepted

Sort by
0
Waleed Seada
Top achievements
Rank 2
answered on 16 Dec 2009, 09:42 PM
Very simple, I just did RadWindowManager1.Windows[0].VisibleOnPageLoad = true and the radwindow opens.

Thanks to all
Waleed
Tags
Window
Asked by
Waleed Seada
Top achievements
Rank 2
Answers by
Waleed Seada
Top achievements
Rank 2
Share this question
or