Click here to Skip to main content
12,757,220 members (42,340 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET
I have a shopping Cart. When a customer adds to cart it will send details to paypal How can i set my add to cart button to send this information.

here is my asp,net html code.

    <asp:DataList ID="dlProducts" runat="server" BackColor="White" 
        BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
        GridLines="Both" RepeatColumns="3" >

            Product Name:
            <asp:Label ID="lblProductNane" runat="server" Text='<%# Bind("ProductName") %>'></asp:Label>
            <br />
            <asp:Image ID="Image1" runat="server" GenerateEmptyAlternateText="True" 
                Height="100px" ImageUrl='<%# "~/ProductImages/"+Eval("ImageName") %>' Width="100px" />
            <br />
            <asp:Label ID="lblListPrice" runat="server" Text='<%# Eval("UnitPrice", "{0:C}") %>'></asp:Label>
            <br />
            <br />
            <asp:LinkButton ID="lnkDetails" runat="server"  CommandArgument='<%# Bind("ProductID") %>' onclick="lnkDetails_Click">Click For Details</asp:LinkButton>
            <br />
            <form target="paypal" action="" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="8M5EFNB9X6EH6">

<asp:ImageButton AlternateText="PayPal — The safer, easier way to pay online." ID="btnBasket" runat="server" CommandArgument='<%# Bind("ProductID") %>' OnClick="btnBasket_Click" ImageUrl="" />
<img alt="" border="0" src="" width="1" height="1" I>

Many thanks
Posted 7-Feb-13 5:31am
Sandeep Mewara 7-Feb-13 11:52am
You need to elaborate on what exactly you tried that trouble you. Adding a button is not an issue, what next?
Mike Meinz 7-Feb-13 13:17pm
When you setup your vendor agreement with PayPal didn't they provide you documentation on how to interface to them?

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170217.1 | Last Updated 7 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100