Pass TextBox Value To Paypal Cart

B

bgreer5050

I would like to pass the value of textbox1 to the item_name value in
the paypal cart. Can someone help me modify the code to obtain this
goal?

Thanks

Code:

<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="Default5.aspx.vb" Inherits="Default5" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>PayPalCart</title>
</head>
<body>
&nbsp;<form target="paypal" action="https://www.paypal.com/cgi-bin/
webscr" method="post">
&nbsp;<br />
<asp:TextBox ID="TextBox1" runat="server" Style="position:
relative"></asp:TextBox>
<asp:Button ID="Button1" runat="server" PostBackUrl="~/
Default6.aspx" Style="position: relative"
Text="Button" /><br />


<br />
<br />
<br />
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-
but22.gif" border="0" name="submit" alt="Make payments with PayPal -
it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/
pixel.gif" width="1" height="1">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="(e-mail address removed)">
<input type="hidden" name="item_name" value=<%=Textbox1 %>>
<input type="hidden" name="item_number" value="1550">
<input type="hidden" name="amount" value="50.00">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
&nbsp;&nbsp;
<input type="hidden" name="bn" value="PP-ShopCartBF">
<br />
<form id="form1" runat="server">
<div>
&nbsp;</div>
 
S

seigo

I would like to pass the value of textbox1 to the item_name value in
the paypal cart. Can someone help me modify the code to obtain this
goal?

Thanks

Code:

<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="Default5.aspx.vb" Inherits="Default5" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>PayPalCart</title>
</head>
<body>
<form target="paypal" action="https://www.paypal.com/cgi-bin/
webscr" method="post">
<br />
<asp:TextBox ID="TextBox1" runat="server" Style="position:
relative"></asp:TextBox>
<asp:Button ID="Button1" runat="server" PostBackUrl="~/
Default6.aspx" Style="position: relative"
Text="Button" /><br />

<br />
<br />
<br />
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-
but22.gif" border="0" name="submit" alt="Make payments with PayPal -
it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/
pixel.gif" width="1" height="1">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="(e-mail address removed)">
<input type="hidden" name="item_name" value=<%=Textbox1 %>>
<input type="hidden" name="item_number" value="1550">
<input type="hidden" name="amount" value="50.00">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">

<input type="hidden" name="bn" value="PP-ShopCartBF">
<br />
<form id="form1" runat="server">
<div>
</div>

Hi,

try this:

<input type="hidden" name="item_name" value=<%=Textbox1.Text %>>

insted of

<input type="hidden" name="item_name" value=<%=Textbox1 %>>

Regards,
Alexander Kleshchevnikov
MCP
www.klalex.com
 
B

bgreer5050

Hi,

try this:

<input type="hidden" name="item_name" value=<%=Textbox1.Text %>>

insted of

<input type="hidden" name="item_name" value=<%=Textbox1 %>>

Regards,
Alexander Kleshchevnikov
MCPwww.klalex.com- Hide quoted text -

- Show quoted text -

Thank you.

I know this is really newbie....
I get the following error:

Exception Details: System.Web.HttpException: Control 'TextBox1' of
type 'TextBox' must be placed inside a form tag with runat=server.
 

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