I'm attempting to make a cart system for my C# based website using ASP.NET.
Currently I've created a method which updates a linkbutton which I have in the master page.
When I try and reference the linkbutton in a product page it errors saying 'productpages_stand' does not contain a definition for 'lbnCart' and no extension method 'lbnCart' accepting a first argument of type 'productpages_stand' could be found'.
Am I not able to link a linkbutton to a masterpage from a web form?
The method:
private void updateCartSummary()
{
// get number of items in cart and show summary in link button
ArrayList cart = (ArrayList)Session["CART"];
int totalItems = cart.Count;
this.lbnCart.Text = "Cart : " + "(" + totalItems + ")";
}
Link button from masterpage:
<asp:LinkButton ID="lbnCart" CssClass="shoppingcarttext button small third" runat="server">Cart : (0)</asp:LinkButton>
Aucun commentaire:
Enregistrer un commentaire