Search code examples
c#asp.netiframecode-behinddetect

is it possible to understand at Code behind whether page is being called inside iframe or not


I need to understand that whether page is being called inside iframe or not at code behind. Is this possible?

I need to determine it in master page code behind.

asp.net 4.0, C#


Solution

  • In general, no.

    Of course you can emit client script that detects iframe and reloads the page with e.g. a querystring.