You must Sign In to post a response.
  • Category: .NET

    Save complete chrome webpage in C#

    Hi,
    I am developing a win form application.

    My requirement is i have a already opened/preloaded web page on chrome browser, i just want to fetch all of this webpage html data without hitting it again and also want to saveAs complete chrome webpage .

    Please help me how can i do this ?
  • #768484
    Hi,

    We can save the complete webpage in the manner of screenshot.
    Using Streamreader , StreamWriter and Webresponses. But it will be like a normal screenshot which we are doing on daily basis like a static PDF page. You can take out any data out of it. Just like a picture we can store it.


    Rectangle rec = webBrowser1.RectangleToScreen(webBrowser1.ClientRectangle); // Browser details
    Bitmap image = new Bitmap(rec.Width, rec.Height); // Height and widths of Browser
    Graphics gra = Graphics.FromImage(image);

    gra.CopyFromScreen(rec.X,rec.Y,0,0,rec.Size)



    But hope you are expecting to take values from the page you are taken from browser?

    Thanks,
    Mani

  • #768486
    Hi,

    Have you gone through this?
    Here author has provided a source code to 'download full web page using .Net'

    http://www.freevbcode.com/ShowCode.asp?ID=2174

  • #768488
    Hi Mani,

    As i mentioned i have already opened/preloaded web page on chrome browser so i how can i use webbrowser control to get a snapshot from chrome ?

    Thanks
    Anil

    anil jain,
    Software Developer,
    NEITL,Mumbai.

  • #768492
    Hi shashikant,

    I looked into your shared link but there they doing a webrequest and hit the url and getting the response but my situation is i can't hit the url as i already have a loaded url on chrome browser.

    anil jain,
    Software Developer,
    NEITL,Mumbai.


Sign In to post your comments