I have a .NET Winforms web browser control that is rendering some application information, rendered from an xslt, for me, and providing links that I want to capture, in order to open relevant forms.
The link href is in the format "context#id", for example, "employee#123".
Although 'Show Source' on the browser shows the link correctly, when I capture the web browser 'N开发者_开发问答avigating' event, the Url is being returned as an about: url, e.g. about:employee#123.
Whilst I can code around this, I would prefer not to provide a hack for an unexpected anomaly (at least unexpected for me).
Why am I getting the about: Urls and is it possible to return the simple url in the href?
I assume that you're showing the HTML by setting the DocumentText
property.
The browser is displaying the URL about:blank
, with the DOM modified to show your content.
All relative links are therefore treated as relative to about:blank
.
For security reasons, IE's href
property returns the absolute URL.
精彩评论