-
Feb 4th, 2009, 07:54 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] [2.0] Non-control HtmlDocument?
Is there a way to access HtmlDocument without using the WebBrowser control? I want the power of HtmlDocument's javascript engine but without the control part.
The current work around I have is.
Code:
WebBrowser wb = new WebBrowser();
wb.Navigate("about:blank");
wb.Document.Write(data);
But you should be able to quickly see what I hate about this. Just to use .net's powerful dom object. I have to create a webbrowser control. Seems very wasteful.
If .net 2.0 doesn't have anything, does .net 3.5 have anything?
-
Feb 5th, 2009, 07:11 AM
#2
Re: [2.0] Non-control HtmlDocument?
You can reference Microsoft.mshtml and use the HTMLDocument object like this.
-
Feb 5th, 2009, 08:24 AM
#3
Thread Starter
Frenzied Member
Re: [2.0] Non-control HtmlDocument?
There are 3, which one should I use? I noticed that 1 of them is 3.5. Is this a 3.5 class?
-
Feb 5th, 2009, 08:29 AM
#4
Re: [2.0] Non-control HtmlDocument?
-
Feb 5th, 2009, 08:41 AM
#5
Thread Starter
Frenzied Member
Re: [2.0] Non-control HtmlDocument?
What is the path? Cause in the image both entries are identical except for the path.
-
Feb 5th, 2009, 08:51 AM
#6
Re: [2.0] Non-control HtmlDocument?
What are the paths specified? I don't think the paths should be of concern though, just select one and test if it will work for you.
-
Feb 5th, 2009, 09:12 AM
#7
Thread Starter
Frenzied Member
Re: [2.0] Non-control HtmlDocument?
Originally Posted by dee-u
What are the paths specified? I don't think the paths should be of concern though, just select one and test if it will work for you.
Well I just used the one in C:\program files\microsoft.net\.
Is it built in .net 1.1/2.0/3.5 or does it not matter?
And are external files automatically download? if they are can you disable that?
-
Feb 5th, 2009, 09:24 AM
#8
Re: [2.0] Non-control HtmlDocument?
Not sure what version comes with each framework, but I am inclined to believe that it would be the version in that screenshot in the link I have posted.
What external files are to be downloaded?
-
Feb 5th, 2009, 09:53 AM
#9
Thread Starter
Frenzied Member
Re: [2.0] Non-control HtmlDocument?
Originally Posted by dee-u
Not sure what version comes with each framework, but I am inclined to believe that it would be the version in that screenshot in the link I have posted.
What external files are to be downloaded?
Well the 2 other paths are for 3.5 but that third one (the one I used) is to "C:\Program Files\Microsoft.NET\Primary Interop Assemblies\". The binary says "COMPLUS" in the version string. So I will assume it is friendly to all versions.
Well if you have a tag like <img src="www.google.com/favico.ico"/> will it automatically download favico.ico or will it wait for the command to?
-
Feb 5th, 2009, 10:02 AM
#10
Re: [2.0] Non-control HtmlDocument?
It behaves the same as a webbrowser only that it has no GUI so it is faster. If a webbrowser downloads it then it should also, if not then no.
-
Feb 5th, 2009, 10:07 AM
#11
Thread Starter
Frenzied Member
Re: [2.0] Non-control HtmlDocument?
Okay, cool. Thankyou for all the help. Looks like a nice wrapper for the native HtmlDocument
-
Feb 5th, 2009, 10:13 AM
#12
Re: [RESOLVED] [2.0] Non-control HtmlDocument?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|