I have a problem. In my View of a product I have a button to add it to cart which looks like this:
<div>
<% using(Html.BeginForm("AddToCart", "Cart")) {%>
<%: Html.HiddenFor(x => x.id_produktu) %>
<%: Html.Hidden("returnUrl", Request.Url.PathAndQuery) %>
<input type="submit" value="Dodaj do koszyka" />
<% } %>
<h4><%: Model.cena_produktu.ToString("c")%></h4>
For this line:
<%: Html.Hidden("returnUrl", Request.Url.PathAndQuery) %>
I get an error:
The call is ambiguous between the following methods or properties: 'System.Web.Mvc.TextInputExtensions.Hidden(System.Web.Mvc.HtmlHelper, string, object)' and 'System.Web.Mvc.Html.InputExtensions.Hidden(System.Web.Mvc.HtmlHelper, string, object)'
How to solve this? Thank you in advance.