I want to accomplish something that sounds simple, but apparently isn't. I have a page with a form on it and various input controls. Let's say the form gets posted back to itself. Now I want to add a bit of ASP.net script to the page so that the server will
save a copy of the *final/rendered* HTML response stream once the client submits the form -- in other words I want the server to keep, as a string/byte array whatever, the exact text that the client would see in their browser if they clicked View->Source.
But it has to be the source sent -after- the user fills out and submits the form. Then I will use that string to send a confirmation email to myself and it will look like a nicely formatted copy of the form page with the users entries in place. I know how
to do a screen scrape with an HttpWebRequest object. I can't use the standard technique I have seen people describe however, since it requires a url to be specified when you create the object. Even if I specify the url of my web form, I don't know how to also
include the form submission data too. So the response would just show up as a blank form. The person who made this post: 289589 wanted something very similar, but he also had a database involved to store form submissions and a page programmed to retrieve and
display that data as plain HTML. Then he could easily use the classic screen scraping technique (an order number was provided as part of the url). One advantage my idea would have (if it ever works) is that if you ever change the page with the form on it (what
fields it has, or how its organized, styles, etc).. you will not have to make any other edits to any other pages anywhere. The script would still retain an exact copy of rendered filled-out form for you to email or archive or whatever. Does anyone know how
I can do this? Thanksssss
sillyg00se
Member
115 Points
23 Posts
Screen Scrape -- kinda
Feb 17, 2004 09:46 PM|LINK