RadWindow & Radalert from user-control

2 posts, 0 answers
  1. Waleed Seada
    Waleed Seada avatar
    241 posts
    Member since:
    May 2006

    Posted 16 Dec 2009 Link to this post

    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
  2. Waleed Seada
    Waleed Seada avatar
    241 posts
    Member since:
    May 2006

    Posted 16 Dec 2009 Link to this post

    Very simple, I just did RadWindowManager1.Windows[0].VisibleOnPageLoad = true and the radwindow opens.

    Thanks to all
    Waleed
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top