Click here to Skip to main content
16,016,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Madam/Sir,


I want to save permanently HTML page of WebkitBrowser .

Please Help me.

Thanks
Mahendra Kumar Das
Posted
Comments
Sergey Alexandrovich Kryukov 7-May-13 2:12am    
What did you try so far? How is this related to jQuery, if you use Webkit? Doesn't the Webkit documentation tells you what to do?
What .NET library (or wrapper) do you use as a Webkit binding?
—SA

1 solution

Im not really sure what Webkit has to do if your wanting to download the html of a page in C# as you can do that using HttpWebRequest class.

See sample below, it will download the html and "permanently" save it to a file:

C#
WebRequest req = HttpWebRequest.Create("http://codeproject.com");
            req.Method = "GET";

            string htmlstring;
            using (StreamReader reader = new StreamReader(req.GetResponse().GetResponseStream()))
            {
                htmlstring = reader.ReadToEnd();
            }

            using (StreamWriter outfile = new StreamWriter(@"c:\temp\websitehtml.html"))
            {
                outfile.Write(htmlstring);
            }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900