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 1022915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:32:12+00:00 2026-05-16T11:32:12+00:00

//method declaration [AcceptVerbs(HttpVerbs.Post)] public ActionResult Step2_UpdateCart(bool? isNextStepClicked) //one of many of the view’s fields

  • 0
//method declaration
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Step2_UpdateCart(bool? isNextStepClicked)

//one of many of the view's fields processed by the method
<input type="hidden" name="isNextStepClicked" value="false" />

I’m reverse engineering a View/Controller set where a form within the view has a series of inputs that are passed via the Submit. One of the inputs is a hidden field – it’s name is found in the method’s signature – and is the only value found in the signature – the rest of the values come from the Request object.

I thought perhaps it might be a case where the method could recursively call itself with a different value than the form carried but i don’t see that happening anywhere.

Does this make any sense? (either my question or my code sample).

many thanx

  • 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-16T11:32:13+00:00Added an answer on May 16, 2026 at 11:32 am

    You might find its better to take advantage of input models or the FormCollection type. With the first option, you get to define your properties, and MVC’s default model binder will do its best to map them across. E.g.:

    public ActionResult Step2_UpdateCart(UpdateCartInputModel model)
    

    Where UpdateCartInputModel could be defined as:

    public class UpdateCartInputModel {
        public bool? isNextStepClicked { get; set; }
        public bool? isSomeOtherPropertyClicked { get; set; }
    }
    

    With the FormCollection, MVC treats this as a special case and where an action accepts an instance of FormCollection it will fill it:

    public ActionResult Step2_UpdateCart(FormCollection form)
    

    With a FormCollection, you have to handle the type casting/conversion yourself.

    I personally don’t see any need to try and build some complex recursive controller action, when what you need could be accomplished doing either of the above.

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

Sidebar

Related Questions

Let's say we have the following method declaration: Public Function MyMethod(ByVal param1 As Integer,
What is the difference between this method declaration: public static <E extends Number> List<E>
If I have a C++ method declaration as follows: class A { public: double
I need a Regex that will match a java method declaration. I have come
Why wasn't the Java throws clause (in method declaration) included in C#?
The method signature of a Java main method is: public static void main(String[] args)
Can someone explain this method declaration syntax for me? In this function, the number
With this method declaration (no overloads): void Method(double d) { // do something with
Consider the method declaration: String.format(String, Object ...) The Object ... argument is just a
I have this method declaration in Util.h file 30:string to_string(const bit_vector& v); Util.cc file

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.