Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 16th, 2004, 03:32 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default 2 Forms

I'm trying to set up a paypal button on my site but I can't figure out how to get it to work.

I have the standard form1 that asp.net creates. And the paypal button form nested inside the form1. I gave the paypal form a different name but I can't get it to go to the paypal site. Right now it just posts back to itself.

 
Old February 18th, 2004, 01:26 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What's the code look like? Is the paypal form inside the ASP.NET form? Also, make sure the paypal form isn't "runat=server" otherwise, .NET might be resetting the action attribute resulting in a postback.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old February 18th, 2004, 01:31 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

It's in the ASP.Net form and here's the code:

<form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post">
<input type="hidden" name="bn" value="AMPPFPWZ.301">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="removed" >
<input type="hidden" name="item_name" value="Service Request Form">
<input type="hidden" name="item_number" value="">
<input type="hidden" name="amount" value="100.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="image_url" value="">
<input type="hidden" name="return" value="removed">
<input type="hidden" name="cancel_return" value="removed">
<input type="image" src="http://images.paypal.com/images/x-click-but6.gif" border="0" name="submit" width="150" height="52">
</form>

 
Old February 18th, 2004, 01:31 PM
Authorized User
 
Join Date: Jan 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ASP.NET Forms and standard HTML forms works a bit different. Paypay passes variables using the standard HTML form. If you have paypal code inside of an ASP.NET, it doesnot know where to pass the variables because the "action" and "method" isn't need in .NET web forms.

 
Old February 18th, 2004, 01:49 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The simple fact of the problem is that you can not put a form inside a form.
 
Old February 18th, 2004, 02:10 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

I changed it to a link with a lot of variables and it works.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Forms and Sub forms Mink Access 1 December 1st, 2004 08:38 AM
Opening forms from other forms Paulsh Access VBA 1 September 30th, 2004 06:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.