Cannot submit to another form

J

James R. Davis

I am converting my ASP code to ASP.NET but have run into a hard stop. On
several of my pages I must post data to a different page as a result of a
submit. With ASP.NET, however, it seems that the 'action' clause on a form
is ignored and it always posts to itself.

Now how, guys, do you manage to set up a form to post to PayPal, for
example?

What am I missing here?
 
S

Scott Roberts

You can't change the "Action" attribute of the form, but you can set the
"PostBackUrl" property on the submit button.
 
C

C White

..NET insists on setting its own action attribute for the form if you're using runat="server". To break away from the submit structure, you might try using postbackurl=" (your web page's name)" in the submit button.





EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 
J

James R. Davis

Thanks.

Yes, I have been able to make this work - that is, using a button with a
postbackurl field. However, there is no postbackurl capability when I want
to use an image instead of a button to initiate a submit.
 
S

Scott Roberts

Yes, I have been able to make this work - that is, using a button with a
postbackurl field. However, there is no postbackurl capability when I
want
to use an image instead of a button to initiate a submit.

How about ImageButton?
 
J

James R. Davis

One step closer to what I want, but not quite there yet.

With your help I found out how to post to an out of application url. That
works perfectly. What it does, however, is take my users away from my site
and to the other site. What I really want to do is cause the other site to
be seen in a new window so that I do not lose my users should they go 'take
a look' at the other site.

Is there an ASP.NET function that can accomplish this for me in association
with the submit button?


.NET insists on setting its own action attribute for the form if you're
using runat="server". To break away from the submit structure, you might
try using postbackurl=" (your web page's name)" in the submit button.
 

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

Top