Results 1 to 12 of 12

Thread: [RESOLVED] [2.0] Non-control HtmlDocument?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    Resolved [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?

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: [2.0] Non-control HtmlDocument?

    You can reference Microsoft.mshtml and use the HTMLDocument object like this.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    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?

  4. #4
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: [2.0] Non-control HtmlDocument?

    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    Re: [2.0] Non-control HtmlDocument?

    What is the path? Cause in the image both entries are identical except for the path.

  6. #6
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    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.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    Re: [2.0] Non-control HtmlDocument?

    Quote 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?

  8. #8
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    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?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    Re: [2.0] Non-control HtmlDocument?

    Quote 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?

  10. #10
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    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.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  11. #11

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    Re: [2.0] Non-control HtmlDocument?

    Okay, cool. Thankyou for all the help. Looks like a nice wrapper for the native HtmlDocument

  12. #12
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: [RESOLVED] [2.0] Non-control HtmlDocument?

    No problem. =)
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width