bluem1 0 Newbie Poster

Team -

I hope you can help me here. I am converting an old ecommerce site to a newer asp.net site but I need to retain the old cart. The cart is unique in that it uses forms to post the items into the cart. So if a page listed 10 products there were 10 forms. When I try this via asp.net the top product button always posts the last product on the page because the cart isn't isolated in it's own form tag.

Here is a sample of the origional code:

<tr>
            <td width="100%">&nbsp;<form method="POST" action="http://www.mysampledomain.com/cgi-bin/cartit.cgi">
              <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
                <tr>
                  <td width="50%" align="center"><font face="Arial">
                  <select NAME="cartitadd" size="1">
                  <option value="The Perfect Prescription^40.00^4^^" selected>The Perfect Prescription (Shown) -- $40.00
                  </option>
                  <option value="The Perfect Prescription^50.00^5^^">The Perfect Prescription -- $50.00
                  </option>
                  </select></font><p><font face="Arial">Enclosure Card:
                  <input TYPE="TEXT" NAME="textadd_Enclosure Card_0.2" SIZE="40" MAXLENGTH="200"><br>
                  <font SIZE="1">Maximum 200 Characters</font> </font> </td>
                  <td width="20%">
                  <p align="center"><font face="Arial"><input TYPE="submit" VALUE="Add To Cart"></font></td>
                </tr>
              </table>
            </form>



  <tr>
            <td width="100%">&nbsp;<form method="POST" action="http://www.sampledomainname/cgi-bin/cartit.cgi">
              <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
                <tr>
                  <td width="50%" align="center"><font face="Arial">
                  <select NAME="cartitadd" size="1">
                  <option value="productname2^40.00^4^^" selected>Product Name 2 (Shown) -- $40.00
                  </option>
                  <option value="Product Name 2^50.00^5^^">Product Name 2 -- $50.00
                  </option>
                  </select></font><p><font face="Arial">Enclosure Card:
                  <input TYPE="TEXT" NAME="textadd_Enclosure Card_0.2" SIZE="40" MAXLENGTH="200"><br>
                  <font SIZE="1">Maximum 200 Characters</font> </font> </td>
                  <td width="20%">
                  <p align="center"><font face="Arial"><input TYPE="submit" VALUE="Add To Cart"></font></td>
                </tr>
              </table>
            </form>

and so on, all would be within the same body tag. How can I make this work via asp.net and keep the products seperated? I can make the cart post, I just need to seperate the products and make it fairly easy to move code around from page to page because they move stuff around on the site all the time.

Any Suggestions?

Thanks!
Dewayne

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.