title: Call VisibleOnPageLoad of RadWindow Client Side
body: <p>I have an application using a MasterPage with content pages and user controls. Inside one of the user controls we have another user control (I know, it's an Inception kind of thing). This user control uses a RadAjaxManagerProxy and has a control that spawns a RadWindow. Everything works fine: the window shows some RadGrids populated with fields from the DB, then I close the window. </p>
  
  <p>All of this is being done with <code>RadWindow1.VisibleOnPageLoad = true</code> in some server-side event. After closing the window, I have no way of setting <code>RadWindow1.VisibleOnPageLoad = false;</code> so when I click on another control that fires an AJAX event (which in this case shows a different RadWindow) the RadWindow from before pops back up. </p>
  
  <p>In other parts of our application we've passed arguments to the server through the OnClientClose method of the RadWindow which we used to call the server-side OnAjaxRequest event of the RadAjaxManager. This fires a server side event and I can set the property, like so:</p>
  
  <p>JS:</p>
  
  <pre><code>function WindowClose(sender, args) {
      SendRequest("ArgumentName");
  }
  
  function SendRequest(requestName) {
      var ajaxManager = $find("&lt;%= RadAjaxManagerMain.ClientID %&gt;");
  
      ajaxManager.ajaxRequest(requestName);
  }
  </code></pre>
  
  <p>C#:</p>
  
  <pre><code>protected void RadAjaxManagerMain_AjaxRequest(object sender, AjaxRequestEventArgs args)
  {
      if (args.Argument == "ArgumentName")
      {
          RadWindow1.VisibleOnPageLoad = false;
      }
  }
  </code></pre>
  
  <p>But since I'm using a RadAjaxManagerProxy, the OnAjaxRequest method of the RadAjaxManager isn't supported. </p>
  
  <p>I've come up with some options for this:</p>
  
  <ul>
  <li>Set VisibleOnPageLoad on the client side, which I can't find anywhere on any forums or documentation.</li>
  <li>Pass some kind of different event to the server so I can set the property.</li>
  </ul>
  
  <p>Or maybe there's something completely different that I'm not aware of or haven't thought of. I'm open to any options. I already have a Javascript method that's fired when I close the window, I just can't figure out a way to get the window to stay closed without doing a full postback.</p>
  
  <p>How can I prevent my RadWindow from opening on another AJAX request?</p>