RadWindow open from server side

2 posts, 1 answers
  1. Corina
    Corina avatar
    12 posts
    Member since:
    Oct 2011

    Posted 21 Nov 2011 Link to this post

    Hi

      On my main page I have a button which brings up a radwindow when clicked. The button event on the server side does some processing which determines the URL querystring elements.

    How can I set the URL on server side and then open the rad window?

    Or is it possible for me to send the URL back to the client side and open from there?

    Please help,

    Thanks :-)
  2. Answer
    Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 22 Nov 2011 Link to this post

    Corina,

    I'm not sure I follow you, but I think you want to do this:

    1. Click on a button
    2. Postback and do some processing to generate a URL
    3. Open a RadWindow using the URL

    If this is the case, then you need only call radopen() with your URL as a parameter from your server-size code. You can do this by using a code like this... 
    string script = String.Format("radopen('{0}', '{1}');", url, windowName);
    Page.ClientScript.RegisterStartupScript(this.GetType(), "script", script, true);

    Alternatively, if you prefer to use the RadAjaxManager...
    RadAjaxManager.GetCurrent(Page).ResponseScripts.Add(String.Format("radopen('{0}', '{1}');", url, windowName));


    -- 
    Stuart

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