

Ask HN: How to verify whether its a standard IE or embedded within C# Form? - tzury

Within the HTML/JS scope, I would like to distinguish between both cases.<p>I wonder if there is a way find that via some window/doc properties?
======
manuscreationis
Is this HTML that you control?

If you're loading it through a C# WinForm control, you might be able to do
something like pre-inject a hidden input tag onto the page with a particular
name/value, and then in the javascript on the actual page, check for that tag
to determine if the page was loaded via a form... I'd guess you'd make a
HttpWebRequest out to the resource you want, manipulate the response in some
way, then load it into your viewable control... I'm shooting from the hip
here, so this is just a guess. I haven't worked in WinForms for a while now.

You might want to look at your approach, however... Are you absolutely in need
of having this page be loaded through a WinForm?

Edit: Also the dude suggesting you post this on SO is correct

~~~
tzury
I have only control on the web app, not the clients.

It is posted on SO in parallel, but there is no help at there, so I thought to
try my luck in this community.

~~~
manuscreationis
Might be able to do UserAgent parsing then... since you're doing a very
specific target, it might (keyword might) be simple to do a string compare
against whatever the UserAgent of the WinForm app is (I have no idea what it
would be, but you could test this very easily), and use that as how you
detect.

------
bdfh42
The well known technical QA site Stackoverflow can be found here
<http://stackoverflow.com/> HN is not an appropriate site for this question

