J
Jonathan Wood
Greetings,
I am using a service that I can interface with using HTML similar to the
following:
<form action="http://www.domain.com/cart.cgi" method="post">
<input type="hidden" name="item" value="p-XXX^129-110-250^Cygnus Hex
Editor^39.00^1" />
<input type="image" name="I4" src="../images/addtocart.gif" alt="Add to
Cart" />
</form>
The problem is that this doesn't seem to work real well with ASP.NET. First,
any ASP.NET page that does anything will already be placed within a <form>
tag. Nested forms cause problems, as would posting the entire page.
To convert the logic above to play nice with ASP.NET, it seems I really need
one of two solutions:
1. Post back to the server. This has some appeal since I could keep some
posted data more private instead of part of my HTML page. However, my
server-side code would need to generate the post string (easy to do), and
then redirect the result to the posted page (not so easy to do).
2. Simply call a javascript handler and somehow have the javascript handler
generate the post string and redirect the browser to the site I'm posting
to.
At this point, I would gladly accept either approach if I could only make it
work.
Does anyone have some recommendations?
Thanks.
I am using a service that I can interface with using HTML similar to the
following:
<form action="http://www.domain.com/cart.cgi" method="post">
<input type="hidden" name="item" value="p-XXX^129-110-250^Cygnus Hex
Editor^39.00^1" />
<input type="image" name="I4" src="../images/addtocart.gif" alt="Add to
Cart" />
</form>
The problem is that this doesn't seem to work real well with ASP.NET. First,
any ASP.NET page that does anything will already be placed within a <form>
tag. Nested forms cause problems, as would posting the entire page.
To convert the logic above to play nice with ASP.NET, it seems I really need
one of two solutions:
1. Post back to the server. This has some appeal since I could keep some
posted data more private instead of part of my HTML page. However, my
server-side code would need to generate the post string (easy to do), and
then redirect the result to the posted page (not so easy to do).
2. Simply call a javascript handler and somehow have the javascript handler
generate the post string and redirect the browser to the site I'm posting
to.
At this point, I would gladly accept either approach if I could only make it
work.
Does anyone have some recommendations?
Thanks.