While using this line of code, I get the error
CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
This code is under tag and inside an asp:Repeater control
<td valign="bottom" width="130">
<%# Eval("Quantity")%>+ in stock<br />
<input class="textbox" maxlength="2" name="Quantity" size="2" type="text" value="1" />
<br />
<a id="A1" class="positive" runat="server"
onserverclick='addtocart(<%#Eval("ProductDescriptionId")%>,Quantity)'> Add to Cart</a>
since onserverclick is evaluated on server side the # is being considered as C# directive. you can replace
<%#Eval("ProductDescriptionId")%>with something likeDataBinder.Eval(Container.DataItem,"ProductDescriptionId").