I have an ASPX page that is sometimes loaded into an iFrame in my application and sometimes not. From the code behind how can you detect if your page is being loaded from an iFrame.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I sincerely doubt you could do that from the code behind. You could probably do that in JavaScript, but not from the code behind.
If you really need to know from the code behind, you would perhaps provide a Query String parameter when you load the page in the iframe? Something like…
Then in code behind you could do something like…