server.transfer to a different server gives me "A virtual path is expected."

G

gh0st54

Hi

I'm trying to post to Paypal to process payment

I try a server.tranfer but I get the error :
"System.ArgumentException: Invalid path for child request
'https://www.paypal.com/cgi-bin/webscr'. A virtual path is expected."

how can I post to paypal for processing ?

thank you
 
N

Natty Gur

Hi,

Use Response.Redirect with query string (as far as I know PayPal support
it).

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
 
G

gh0st54

Thanks it works

but I would still like to know how to do it with the post procedure

I might need it later
 
N

Natty Gur

Hi,

You can add new Form without the runat=server attribute and set it
action to the PayPal page.

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
 
G

gh0st54

You are right ,
I had never noticed the exact messge when trying to put multiple form
:
it says :

A page can have only one SERVER-SIDE form tag

now if my form is within my server side form , it will be treated by
the server side = not posting .

is there a way to have your cake and eat it too .

can a form be inside a server-side form and still post to it's action
param ?
I know I'm asking weird stuff but its a nice exercice :)

thank you
 
N

Natty Gur

I dont think so.

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
 

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

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top