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

  • Home
  • SEARCH
  • 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 77571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:51:04+00:00 2026-05-10T20:51:04+00:00

I converted my web application from preview 3 to beta1 and am now trying

  • 0

I converted my web application from preview 3 to beta1 and am now trying to put the new functions of the framework to use. One of them is ModelBinding.

For this particular situation I created a class that is (for now) just a container of a bunch of simple-type properties. If I create a form with a bunch of textboxes, I want the framework to fill a SearchBag instance with these fields.

  • Where do I start? Is this behaviour out of the box or do I implement a SearchBagBinder? I had a quick look at the IModelBinder but can’t quite wrap my head around it and the DefaultModelBinder source doesn’t make me any the wiser.
  • What is this ModelBindingContext?
  • How do I access my form fields?
  • What if the values are not passed on by a form but rather by entering a URL directly?
  • Where do I find up-to-date information on this (most blogs are outdated)? I thought I read a post by Phil at one time, but I can’t seem to find it no more.

Any help is appreciated.

  • 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. 2026-05-10T20:51:05+00:00Added an answer on May 10, 2026 at 8:51 pm
    • Where do I start? Is this behaviour out of the box or do I implement a SearchBagBinder? I had a quick look at the IModelBinder but can’t quite wrap my head around it and the DefaultModelBinder source doesn’t make me any the wiser.

    It is out of the box. You can either use UpdateModel or ModelBinder to acheive what you are looking to do.

    • What is this ModelBindingContext?

    This contains all the necessary information for the request to be bound to your Model. Similar to ControllerContext and ActionFilterContext, it is basically the state of the ModelBinder and contains all the information necessary to do what you want, if you follow the ASP.NET MVC teams recommendations for what the ModelBinder is supposed to do.

    • How do I access my form fields?
    context.HttpContext.Request.Forms['myformfield']; 

    or

    foreach (var field in context.HttpContext.Request.Forms.Keys) {     var value = context.HttpContext.Request.Forms[field]; } 
    • What if the values are not passed on by a form but rather by entering a URL directly?

    If you need to check both the Form and the QueryString just loop through both collections.

    foreach (var field in context.HttpContext.Request.Forms.Keys) {     var value = context.HttpContext.Request.Forms[field]; } foreach (var field in context.HttpContext.Request.QueryStrings.Keys) {     var value = context.HttpContext.Request.QueryStrings[field]; } 

    or you can loop through Param which will contain, Form, QueryString, Headers, etc.

    foreach (var field in context.HttpContext.Request.Params.Keys) {     var value = context.HttpContext.Request.Params[field]; } 
    • Where do I find up-to-date information on this*(most blogs are outdated)? I thought I read a post by Phill at one time, but I can’t seem to find it no more.

    You have it right Phil is the best place for information as the PM of ASP.NET MVC.

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

Sidebar

Ask A Question

Stats

  • Questions 158k
  • Answers 158k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer As long as you're using Django version 1.1, you can… May 12, 2026 at 11:17 am
  • Editorial Team
    Editorial Team added an answer Ultimately, OpenCL will work the same way as OpenGL. That… May 12, 2026 at 11:17 am
  • Editorial Team
    Editorial Team added an answer You need to tell Delphi to not check for updates… May 12, 2026 at 11:17 am

Related Questions

I'm having a really annoying problem with debugging javascript with VS2008. If I simply
I'm exploring several possibilities for developing a new system (web application). I'm an old
I'm using MySQL 5, and my database experienced some corruption last week. The technicians
Consider a web application that resizes large tiff files on the fly. Each large

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.