I am tryiing to create an "add to cart" button for each item that is displayed by an XSLT file. The button must be run at server (VB) and I need to pass parameters into the onlick, so that the requested item is added to the cart. Is this possible, and if so, how should I go about it?
When I try
<asp:Button id="Button123"
Text="Add to Cart"
CommandName="AddToCart"
CommandArgument="123"
OnCommand="CommandBtn_Click"
runat="server"/>
I get "'asp' is an undeclared namespace"
I've also tried
<asp>
<xsl:attribute name="Button">id="BtnAddToCart"</xsl:attribute>
<xsl:attribute name="text">Add to cart</xsl:attribute>
<xsl:attribute name="CommandName">AddToCart</xsl:attribute>
<xsl:attribute name="CommandArgument">123</xsl:attribute>
<xsl:attribute name="Command">CommandBtn_Click</xsl:attribute>
<xsl:attribute name="runat">server"</xsl:attribute>
</asp>
Which doesn't give any errors, but doesn't do anything at all
I need to use XSLT directly for displaying my products, as it is for an assignment, although what I am trying to do here is beyond the scope of the assignment.