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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:15:11+00:00 2026-05-15T21:15:11+00:00

I have example code in which the signature of the Create action menthod in

  • 0

I have example code in which the signature of the Create action menthod in the controller looks like this:

    [HttpPost]
    public ActionResult Create(JobCardViewData viewData)

I have just created a new MVC application and the same signature looks like this:

    [HttpPost]
    public ActionResult Create(FormCollection collection)

I would prefer to know how to implement my action methods like the top example, or at least how to convert from the FormCollection to a business object without going as low level as using Reflection.

  • 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-15T21:15:12+00:00Added an answer on May 15, 2026 at 9:15 pm

    Personally I avoid using FormCollection as it is a collection of magic strings. I would recommend you to always use this signature:

    [HttpPost]
    public ActionResult Create(JobCardViewData viewData)
    

    and leave the model binder do the job of parsing the request parameters into a strongly typed object (you don’t need to resort to reflection or doing anything).

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

Sidebar

Related Questions

I have a method which have this signature public static IList<T> GetBy<T>(System.Linq.Expressions.Expression<Func<T, bool>> expression)
Anyone have example Rx code that shows how to execute an action due to
Suppose we have this example: http://techdroid.kbeanie.com/2009/07/custom-listview-for-android.html with source code available here: http://code.google.com/p/myandroidwidgets/source/browse/trunk/Phonebook/src/com/abeanie/ How can
I have this code (an example that PHP generates for me)... <select id=outsideBlue3> <option
For example we have this line chart at Google Code API there is a
Can I have good example or code about how to use Ajax Datepicker in
I have an example in C# code, but it is using streamWriter . It
I have an example of some code that I see often in websites that
Hi I have a code example available here: http://jsbin.com/oxoweh My problem is that I
my JavaDoc doesn't work when I have a code example with an annotation. Any

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.