online Basket Question


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: online Basket Question

  1. #1
    Join Date
    Oct 2005
    Posts
    133

    online Basket Question

    Hi All,

    first off thanks for your help

    i have an online basket asp application which on each category form has a asp:repeater control, i have added in a nother column to each row of the repaeater with an add and clear button, however i dont know how to match up the button or should i say make the button know which row it is on and how to get the code behind the button to work, could anyone give me any idea on where to start,

    have a vague idea that it has somthing to do with the
    ByVal e As System.EventArgs declaration on the aspr3eapeter behind the page method

    any help is always appreciated

    Thanks
    Rob

  2. #2
    Join Date
    Oct 2005
    Posts
    133
    i have managed to get the row number by using the repeater.items.count properties, and it displays the row number in a hidden text box in each row, but am having issues getting the button to know which row it must be communicating with

    is there anyway i can get dynamic buttons to appear per row created so the button knows which row it is going to be editing .?

    thanks
    Rob

  3. #3
    Join Date
    Oct 2005
    Posts
    133

    thanks in advance

    below is the code i used


    <form id ="Form1" runat ="server">
    <ASP:Repeater id="MyRepeater" runat="server">
    <HeaderTemplate>
    <Table width="70%" style="font: 8pt verdana">
    <tr style="background-color:FF80FF">
    <th>
    Product Image
    </th>
    <th>
    Item Code
    </th>
    <th>
    Product Name
    </th>
    <th>
    Description
    </th>
    <th>
    Price Each
    </th>
    <th>
    Price/100g
    </th>
    <th>
    Quantity
    </th>
    </tr>
    </HeaderTemplate>
    <ItemTemplate>
    <tr style="background-color:FFC0FF">
    <td>
    <div align ="center"><img src='<%# Container.DataItem("Location") %>'></div>
    </td>
    <td>
    <asp:Label ID = "Label1" text ='<%#DataBinder.Eval(Container.DataItem, "SKU")%>' runat = "server"></asp:Label>
    </td>
    <td>
    <asp:Label ID = "Label3" text ='<%#DataBinder.Eval(Container.DataItem, "Name")%>' runat = "server"></asp:Label>
    </td>
    <td>
    <%#DataBinder.Eval(Container.DataItem, "Description")%>

    </td>
    <td>
    <%#DataBinder.Eval(Container.DataItem, "SalePrice")%>

    </td>
    <td>
    <%#DataBinder.Eval(Container.DataItem, "SalePricePer100G")%>

    </td>
    <td>
    <asp:textbox ID = "Textbox1" runat="Server" size ="4"></asp:textbox> <asp:Button ID = "btnAdd" Text = "Add" runat ="server" /><asp:Button ID = "Button1" Text = "Clear" runat ="server" /><br />
    <input type ="checkbox" id ="perG" value = "100g Order" />Per 100g Order
    <asp:Textbox id = "Textbox2" text ='<%#MyRepeater.Items.Count%>' runat ="server"></asp:textbox>
    </td>
    </tr>

    </ItemTemplate>
    <FooterTemplate>
    </table>
    </FooterTemplate>

    </ASP:Repeater>

    so i got a button to appear with each row that is created, but i have no idea how to apply the code on the button on each row to know which row it is reflecting

    Thanks
    Rob

Similar Threads

  1. Question about "disconnecing" TCP connections
    By JDHalfrack in forum .NET
    Replies: 4
    Last Post: 08-07-2008, 05:17 PM
  2. OVERSEAS Online Data Entry Information
    By jai in forum Careers
    Replies: 0
    Last Post: 02-21-2003, 12:43 AM
  3. DTD for Online Help?
    By andyz in forum XML
    Replies: 0
    Last Post: 11-26-2001, 01:51 PM
  4. development of online dss
    By philys in forum ASP.NET
    Replies: 0
    Last Post: 09-04-2000, 08:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center