1

I have a control in a master page that I want to display only when the master page is not in a RadWindow; when in a RadWindow, it should be hidden. Is that possible to do, to detect when the page request is inside the RadWindow?

Thanks.

Brian Mains
  • 50,520
  • 35
  • 148
  • 257
  • I can't imagine a way how you could determine (on the server-side) how the resulting HTML will be rendered on the client (e.g. in a top-level window, in an IFRAME or whatever). – M4N Jun 07 '11 at 22:16
  • M4N is right. There is no way find that on the server. The problem itself has nothing to do with the RadWindow control - the window is using an IFRAME and behaves just like one. – GeorgiTunev Jun 08 '11 at 07:02
  • @GeorgiTunev: So @andryuha response isn't a possibility? – Brian Mains Jun 08 '11 at 12:50
  • 2
    Only if you make sure that all RadWindows that can open that page have the ReloadOnShow property set to true. When this property is enabled, we add that argument to the query string in order to ensure that the browser will always load a fresh version of the page (IE has a very "nasty" caching when displaying content in an IFRAME and this was one of the main reasons for implementing ReloadOnShow this way). – GeorgiTunev Jun 08 '11 at 13:35

2 Answers2

2

Try to use Firefox's Firebug's Net tab or Fiddler to review the http requests being made when you open a page in the RadWindow.

Just monitor requests on this RadWindow demo

http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window

Telerik passes rwndrnd to the page that's being opened in the RadWindow

http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/editformcs.aspx?EmployeeID=1&rwndrnd=0.8749773452267927

If that querystring is present, that could serve you as an indicator of it being opened in RadWindow.

Hope this helps. From past experience working with telerik's stuff, it was an exercise in finding and using hacks like this all the time to get anything done.

andryuha
  • 1,526
  • 3
  • 15
  • 31
0

Here is the way, but only on client

http://www.telerik.com/community/forums/aspnet-ajax/window/best-way-to-detect-page-is-in-a-radwindow.aspx

Antonio Bakula
  • 20,445
  • 6
  • 75
  • 102