This sample is a simple demonstration of basic features of Knockout MVC. Our model contains two common text properties: FirstName and LastName. Besides, there is Expression<Func<string>> function that will be converted to JavaScript function (you can see it in the generated html). Thus, a simple JavaScript application will be generated based on our C# code; the application can work without server connection. We set what interface elements correspond to model properties in the Razor template (including calculated property FullName). It is possible to set initial values for model properties in the controller.

Please pay attention to the fact that lable corresponding to FullName is updated automatically — you don’t need to write any additional code to catch onchange event in JavaScript code.

The original example: http://knockoutjs.com/examples/helloWorld.html