Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to save web page as MHTML?

How to save web page as MHTML?

Scheduled Pinned Locked Moved C#
csharptutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Abdallah Al Dalleh
    wrote on last edited by
    #1

    Hi all If I have a web page URL string in C#, how to save the web page as MHTML extension?

    E J 2 Replies Last reply
    0
    • A Abdallah Al Dalleh

      Hi all If I have a web page URL string in C#, how to save the web page as MHTML extension?

      E Offline
      E Offline
      Emmanuel Medina
      wrote on last edited by
      #2

      First, the mandatory question since you don't mention it in your post: What have you tried? I remember I did something kind of like what you want about a year ago, since I didn't have a clue, I googled (don't remember the specific query), and one of the first links was a MSDN page with an example to it. What I mean is: please show/tell us what you've done, and what is the specific problem that you have, so we know that you are indeed making an effort and not just wasting everyone's time. Now, I'm not just gonna lecture you and give you nothing. Look for info on: How to read/write files in C# How to get the HTML contents of a web page You'll need to get acquainted with the following namespaces/classes: System.Net[^] System.IO[^] Filestream[^] WebClient[^]

      If you think you can do a thing or think you can't do a thing, you're right - Henry Ford Emmanuel Medina Lopez

      1 Reply Last reply
      0
      • A Abdallah Al Dalleh

        Hi all If I have a web page URL string in C#, how to save the web page as MHTML extension?

        J Offline
        J Offline
        Jay Nardev
        wrote on last edited by
        #3

        Simply get the content of page and create file with MHTML extension and save. Check below link How to read full web page in C#[^] http://stackoverflow.com/questions/4510212/how-i-can-get-web-pages-content-and-save-it-into-the-string-variable[^]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups