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 http://www.c-sharpcorner.com/default.asp 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
    1. Advertising

  2. contact

    Mr. Arnold Guest

    Re: DOTNET: dotnetHow to Save ALL CONTENTS of web page with "SaveFileDialogControl" in dotnet

    contact wrote:
    > 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 http://www.c-sharpcorner.com/default.asp 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 !!
    >


    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
    x.name = (the name of the control you're looking for)
    x.data = (data of the control)
    next

    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
    dotnet.general.

    http://msdn.microsoft.com/newsgroups/topic.aspx?url=/msdn-files/028/201/317/topic.xml
     
    Mr. Arnold, Dec 28, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Stevenson

    Cannot save web page

    Ben Stevenson, Jul 1, 2004, in forum: Computer Support
    Replies:
    7
    Views:
    5,346
    Blinky the Shark
    Jul 2, 2004
  2. Mike
    Replies:
    12
    Views:
    17,791
    treehugger
    Oct 10, 2004
  3. barb
    Replies:
    5
    Views:
    1,085
  4. DemoDisk

    Can't save web page

    DemoDisk, Jul 14, 2006, in forum: Computer Support
    Replies:
    7
    Views:
    1,166
  5. Replies:
    0
    Views:
    1,967
Loading...

Share This Page