POST and Redirect to Non-ASP.NET Site

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top