Here is my Html.BeginForm
code. I want to pass 2 values to the Action CheckOutProduct
.
How can I trigger Html.BeginForm
by clicking a button?
@Html.BeginForm("CheckOutProduct", "CheckOut")
{
<input type="hidden" id="productCodeForCheckout" value="" />
<input type="hidden" id="productQtyForCheckout" value="0" />
}
<button class="btn" id="checkout"><span>add to cart</span></button>