Page 1 of 1

Disabling Quantity Field

Posted: Thu Oct 13, 2016 9:32 am
by ajackson
Is there a way to disable(make it not editable) to the quantity field in the shopping cart? We want to dynamically insert the item, price, and quantity(which we know how to do), but the price is generated by a formula and how many items a user wants to purchase.. so we do not want to allow the user to edit the price in the cart. In order for them to edit the quantity, they will have to delete the previous one and add a new one.

Re: Disabling Quantity Field

Posted: Thu Oct 13, 2016 10:58 pm
by nadeem
You can make it disable by setting the ReadOnly property on the quantity field at Basket page something like this:

Code: Select all

<asp:TextBox ID="Quantity" runat="server" ReadOnly="true" MaxLength="5" Text='<%# Eval("Quantity") %>' Width="50px"></asp:TextBox>