Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6842647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:07:33+00:00 2026-05-27T00:07:33+00:00

I have a problem. In my View of a product I have a button

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:07:33+00:00Added an answer on May 27, 2026 at 12:07 am

    Three ways:

    1. Fully qualify the method:

      System.Web.Mvc.Html.Hidden(Html, "returnUrl", Request.Url.PathAndQuery)
      
    2. Make your own static method with a different name that obfuscates the name.

      public static string TheHiddenIWant(this HtmlHelper helper, string name, object value)
      {
          return System.Web.Mvc.Html.Hidden(helper, name, value);
      }
      Html.TheHiddenIWant("returnUrl", Request.Url.PathAndQuery);
      
    3. Don’t include the reference or using statement for the extension method you don’t want. For
      example, get rid of using System.Web.Mvc.TextInputExtensions, or just get rid of the reference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im create this code to store page view in database, but i have problem
I am currently stuck on a small problem. I have a List View which
I am using cancan for authorization. I have a shared view which need authorize
My problem is this: I have got a view/action called new . In this
I'm just getting started using Mustache and I have this rendering problem. I send
In my ListView I have an ItemTemplate and EditItemTemplate which look something like this,
i have a problem with switch view between 2 views with nib files !
I have the problem that my view controller class has too many delegates and
I have problem adding arraylist to list view, will explain about my problem here..
i have a list view with a BaseAdapter for custom view.. i have problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.