How to download results file from form post (In IE it generates a save file dialog) 
Author Message
 How to download results file from form post (In IE it generates a save file dialog)

Hi,
Currently I am using a windows macro script to post data to a form on the
web with IE, then the server prompts with a save file dialog so that we can
download the results txt file, using keyboard presses and mouse clicks we
download and save the file locally. I am trying to figure out how to do this
with C#, I already am using C# to download html result pages from form posts
but cannot figure out how to download result files from form posts. I would
really appreciate some help on this, thanks!
Matt Skibbs


Fri, 20 May 2005 11:57:14 GMT  
 How to download results file from form post (In IE it generates a save file dialog)


Quote:
> Hi,
> Currently I am using a windows macro script to post data to a form on the
> web with IE, then the server prompts with a save file dialog so that we
can
> download the results txt file, using keyboard presses and mouse clicks we
> download and save the file locally. I am trying to figure out how to do
this
> with C#, I already am using C# to download html result pages from form
posts
> but cannot figure out how to download result files from form posts. I
would
> really appreciate some help on this, thanks!
> Matt Skibbs

A little more info, I get an authentication error when I try to use my
normal web file download app. But the URL works fine when I plug it into
IE... The user/pass are in the beginning of the URL in the

due to the automatic proxy feature in IE?
Thanks for the help!
Matt Skibbs


Fri, 20 May 2005 12:06:40 GMT  
 How to download results file from form post (In IE it generates a save file dialog)
Matt,

    If you are using a proxy to get out to the internet, then you will have
to populate the proxy information on the object exposed by the Proxy
property on your HttpWebRequest class.

    As for retrieving information from a form post, your HttpWebResponse
will get the results from the post just like any other request.

    Hope this helps.

--
               - Nicholas Paldino [.NET/C# MVP]


Quote:



> > Hi,
> > Currently I am using a windows macro script to post data to a form on
the
> > web with IE, then the server prompts with a save file dialog so that we
> can
> > download the results txt file, using keyboard presses and mouse clicks
we
> > download and save the file locally. I am trying to figure out how to do
> this
> > with C#, I already am using C# to download html result pages from form
> posts
> > but cannot figure out how to download result files from form posts. I
> would
> > really appreciate some help on this, thanks!
> > Matt Skibbs

> A little more info, I get an authentication error when I try to use my
> normal web file download app. But the URL works fine when I plug it into
> IE... The user/pass are in the beginning of the URL in the

> due to the automatic proxy feature in IE?
> Thanks for the help!
> Matt Skibbs



Sat, 21 May 2005 04:24:20 GMT  
 How to download results file from form post (In IE it generates a save file dialog)
Does it work the same way even if it is not an html page that gets returned?
It wasn't working when I tried it before... I'll post my code next time I go
to work, thanks Nicholas!
-Matt



Quote:
> Matt,

>     If you are using a proxy to get out to the internet, then you will
have
> to populate the proxy information on the object exposed by the Proxy
> property on your HttpWebRequest class.

>     As for retrieving information from a form post, your HttpWebResponse
> will get the results from the post just like any other request.

>     Hope this helps.

> --
>                - Nicholas Paldino [.NET/C# MVP]





> > > Hi,
> > > Currently I am using a windows macro script to post data to a form on
> the
> > > web with IE, then the server prompts with a save file dialog so that
we
> > can
> > > download the results txt file, using keyboard presses and mouse clicks
> we
> > > download and save the file locally. I am trying to figure out how to
do
> > this
> > > with C#, I already am using C# to download html result pages from form
> > posts
> > > but cannot figure out how to download result files from form posts. I
> > would
> > > really appreciate some help on this, thanks!
> > > Matt Skibbs

> > A little more info, I get an authentication error when I try to use my
> > normal web file download app. But the URL works fine when I plug it into
> > IE... The user/pass are in the beginning of the URL in the

it
> > due to the automatic proxy feature in IE?
> > Thanks for the help!
> > Matt Skibbs



Sat, 21 May 2005 15:35:58 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Weird IE file download problem

2. Want to make application like IE, and capture file download functionality

3. IE aborts download of a file on PCMCIA card insertion

4. Save the query results into a file with ADO

5. IE Save as file function

6. Post Again: Overwrite default File Save As Dlg

7. launch IE file property page form a program

8. Uploading file with wininet and post form

9. Any idea how to save a web link to a file using win form

10. Problem with saving data into a text file in pre-formatted form

11. generating .h files from .c files

12. Generating files with sequential file name automatically.

 

 
Powered by phpBB® Forum Software