There is a big problem I've been working on for a whole week. I want to post to antoher page on another website which is not mine and which I can't control. The scenario is this:
- A user fills a form on my website
- When the user pressess the submit button, the form values collected have to pass on to another website by using the POST method and not GET
- However, before I post to the other website, I would like to save the form data in my database.
Basically:
- I cannot use Response.Redirect, because with Response.Redirect I can pass the values only by using the GET method.
- I cannot use Server.Transfer because the URL on the browser would remain referencing my own website which is undesirable in my case since my website does not have SSL (https) whilst the other website has SSL and the users would enjoy seeing it.
- I cannot create a server-side OnClick event handler on the submit button with a PostBackURL posting to somewhere else because since the page is not posting back on itself, the event handler would simply not be called.
- I know its stupid but I've also researched on URL rewriting just in case I manage to server.transfer to another page but I would rewrite the actual URL like response.redirect would have done. No sucess, you can't rewrite the domain part of the URL (if you know how please tell me).
After hard work having tried all of these, I am out of ideas. It would be really stupid to have the user go to another page on my website and make another submit click just to enable me to save the form data before he leaves.
Can you help me solve this issue?
You must probably use an http handler to do something so low level as that.
HRM
-- As you want to post the data to other site you can set the form action property to the desired URL and submit the page.
[tfl - 25 09 09] Hi - and thanks for your post. You should post
questions like this to the MSDN Forums at
http://forums.microsoft.com/msdn or the MSDN Newsgroups at
http://www.microsoft.com/communities/newsgroups/en-us/. You are much
more likely get a quicker response using the forums than through the
Community Content. For specific help about:
.NET Framework : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.dotnet.framework
PowerShell : http://groups.google.com/group/microsoft.public.windows.powershell/topics?pli=1
SQL Server : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.sqlserver%2C&
Visual Studio : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.vstudio%2C&
Windows : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.windows%2C&
All Public : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public%2C&