|
| Author |
Message |
James R. Davis
Joined: 29 Nov 2007 Posts: 6
|
Posted: Tue Dec 04, 2007 7:41 pm Post subject: Cannot submit to another form |
|
|
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?
Archived from group: microsoft>public>dotnet>framework>aspnet |
|
| Back to top |
|
 |
Scott Roberts
Joined: 15 Nov 2007 Posts: 23
|
Posted: Tue Dec 04, 2007 7:56 pm Post subject: Re: Cannot submit to another form |
|
|
You can't change the "Action" attribute of the form, but you can set the
"PostBackUrl" property on the submit button.
"James R. Davis" wrote in message @TK2MSFTNGP03.phx.gbl...
>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?
>
> |
|
| Back to top |
|
 |
C White
Joined: 11 Dec 2007 Posts: 1
|
Posted: Mon Dec 10, 2007 7:59 pm Post subject: postbackurl |
|
|
..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 |
|
| Back to top |
|
 |
James R. Davis
Joined: 29 Nov 2007 Posts: 6
|
Posted: Tue Dec 11, 2007 5:21 pm Post subject: Re: postbackurl |
|
|
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. |
|
| Back to top |
|
 |
Scott Roberts
Joined: 15 Nov 2007 Posts: 23
|
Posted: Tue Dec 11, 2007 6:13 pm Post subject: Re: postbackurl |
|
|
> 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? |
|
| Back to top |
|
 |
James R. Davis
Joined: 29 Nov 2007 Posts: 6
|
Posted: Wed Dec 12, 2007 10:33 pm Post subject: Re: postbackurl |
|
|
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?
wrote in message @yahoo.com...
> .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
|
|
| Back to top |
|
 |
|