Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / October 2006

Tip: Looking for answers? Try searching our database.

How to get the domain name from a WinForm UserControl hosted in Internet Explorer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kellygreer1 - 16 Oct 2006 22:22 GMT
I have developed a User Control (in .NET 2.0) that runs hosted inside
Internet Explorer.
like in these articles
http://msdn.microsoft.com/msdnmag/issues/02/01/UserCtrl/
http://support.microsoft.com/?kbid=892466

Is there an easy way to reference the HTML Document "parent" of this
control and ask it for the domain?  I could not find any way to
reference the document that worked (ex Parent or Container property)

Is there a way to ask the IEHost.dll that is hosting this control in
IE?

Is there a way through the security model to ask the Assembly if it has
been loaded with restricted permissions and if so why? and somehow get
to the domain it was pulled down from....

Any ideas?

Thanks in advance,
Kelly Greer
kellygreer1@nospam.com
change nospam to yahoo
Bryan Phillips - 18 Oct 2006 00:46 GMT
You can reference the document object using the code below:

    HtmlDocument document =
(HtmlDocument)this.Site.GetService(typeof(HtmlDocument));

You will need unmanaged code permission to be able to run this code.

Bryan Phillips
MCSD, MCDBA, MCSE
Blog:  http://bphillips76.spaces.live.com

> I have developed a User Control (in .NET 2.0) that runs hosted inside
> Internet Explorer.
[quoted text clipped - 19 lines]
> kellygreer1@nospam.com
> change nospam to yahoo

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.