Getting Started with ASP.NET MVC 3 and Razor

I had a chance to give a talk on ASP.NET MVC 3, Razor and jQuery today at a company and wanted to post the slides and demos from the talk. The focus was on getting started with ASP.NET MVC 3 projects and .cshtml files including creating pages using the new Razor syntax (which I personally love….never going back to the Web Forms View Engine) as well as working with jQuery. Topics covered in the demos (download below) include:

  • Binding form data to custom object properties
  • Validating a model using data annotations and IValidatableObject
  • Integrating jQuery into MVC sites (using the DataTables plugin)
  • Using the new WebGrid class to generate tables with sorting and paging functionality
  • Integrating Silverlight applications into MVC sites
  • Exposing JSON data from a controller action and consuming it in Silverlight
  • Using the Ajax helper to add AJAX functionality (without jQuery)

 

 

The code and slides from the talk can be downloaded here.

 

 

Logo_702D5F60[1]

If you or your company is interested in training, consulting or mentoring on jQuery or .NET technologies please visit http://www.thewahlingroup.com for more information. We’ve provided training, consulting and mentoring services to some of the largest companies in the world and would enjoy sharing our knowledge and real-world lessons learned with you.

Published Tuesday, February 22, 2011 5:07 PM by dwahlin

Comments

# re: Getting Started with ASP.NET MVC 3 and Razor

Thursday, February 24, 2011 10:57 AM by dwahlin

Hi Brij,

You can get the same benefits of MVC in Silverlight with the MVVM pattern.  It's really nice to work with if you haven't seen it already (weblogs.asp.net/.../getting-started-with-the-mvvm-pattern-in-silverlight-applications.aspx). As far as your question about "do we have any realtime use of Silverlight with Razor or MVC?" I'm not sure what you mean there exactly. If you can give me more detail on what you mean I'll be happy to respond.

Dan

# re: Getting Started with ASP.NET MVC 3 and Razor

Wednesday, March 2, 2011 11:42 PM by akachai kaning

Thanks for this post, it helps me to jump start with ASP.NET MVC.