Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

How mvc model binder binds data to model and when I submit form or pass model to view.

//Action
public ActionResult ShowStudent()
{
  Student student = new Student();
  return View(student);
}

//View
@Html.TextBoxFor(x=>x.Name)


//Html Output in browser
<input type="text" id="Name" name="Name" value="" />

How this is happens in MVC? Please suggest me any book or link so that I can understand more about MVC.

share|improve this question
    
The framework "remembers" (or can "reconstruct") the fact that x.Name ended rendered as an input element whose id and name were "Name". When the form is submitted and the URL has a "Name" parameter, it gets assigned to x.Name. What is difficult with that? –  SJuan76 Jul 26 at 20:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.