DOTNET: dotnetHow to Save ALL CONTENTS of web page with "SaveFileDialog Control" in dotnet

Discussion in 'Computer Support' started by contact, Dec 28, 2006.

  1. contact

    contact Guest

    How can I Save a web page using SaveFileDialog Control in DotNet?
    Currently, it only saves the .htm file but NOT saving the images in a
    separate folder .

    Example:- I opened in a
    AxSHDocVw.AxWebBrowser control.
    When I click on Save (using the SaveFileDialog control) it only saves
    the .htm file for above link but does not create a separate folder to
    save images ??

    Hope for an early reply !!
    contact, Dec 28, 2006
    1. Advertisements

  2. contact

    Mr. Arnold Guest

    The SaveFileDialog or OpenFileDialog controls are controls that allow
    you to give location and name to file to be saved or a points to a
    location and file name to be opened.

    Those controls have no means of actually opening or saving files. As an
    example, you use the OpenFileDialog to point to the location where the
    file is located to open, the OpenFileDialog.Filename that holds the
    pathing string for the file can then be used in a
    TextReader.Open(OpenFileDialog.Filename). It would be the same for
    TextWriter.Open(SaveFileDialog.Filename) to save the file.

    Of course, you would have program logic to loop and read or save records
    to or from the file.

    I would think that you would use ASP and walk the ASP Page from the
    CodeBehind File looping to look at each control and get the data from
    the control and do what you have to do to save the data on the page.

    This is a VB.Net example

    dim x as webcontrol

    for each x in webform = (the name of the control you're looking for) = (data of the control)

    It's something like that and the commands may not be on the money, but I
    have walked the form looking for various controls and their data that
    way, from the CodeBehind File.

    You can use Google to find examples.

    There is also Javascript and Ajax Pro for .NET (free) with C# and VB.Net
    examples on how to do things, using JavaScript. You can use Google to
    find it.

    You got questions about .NET, then you should ask in the proper NG, like
    Mr. Arnold, Dec 28, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.