.NET 3.5
Encapsulate Multiple HTML Helpers to Make Views More DRY
MVC 2 is adding many new features that make views more elegant to write. For example, the new EditorFor() Html helper returns the appropriate HTML input elements for a given property so you don’t have to explicitly specify text box, dropdown, or whatever control you need and can even use the [UIHint] attribute to specify the editor you want to use (either an OOTB or custom editor). This results in view markup that often looks like this: 1: <p> 2: <%=Html.LabelFor(m => m.FirstName)%> ......
Posted On Sunday, January 17, 2010 12:52 PM | Comments (4)
LINQ to XML with Hierarchical XML, Optional Elements, and Namespaces
Recently I had an interesting task to consume a particular XML document and populate a C# object from it. The structure of the XML document looked roughly like this: 1: <root xmlns=" 2: <entry> 3: <id>1</id> 4: <title>abc</title> 5: <content> 6: <div xmlns=" 7: <table> 8: <tr> 9: <td>Item1</td> 10: <td>111</td> 11: </tr> 12: <tr> 13: <td>Item2</td> ......
Posted On Tuesday, December 29, 2009 11:34 PM | Comments (2)
ASP.NET MVC Application –
Recently my company just released the first version of a new MVC web site: This project, led by Oskar Austegard, is was I consider a highly successful real-world implementation of MVC. In a time when most music these days is downloaded, the production and performance engineers, and recording professionals that work on the music don’t always get credit because there is no CD booklet to look through. Album Credits is almost like a LinkedIn for recording professionals. From the about ......
Posted On Wednesday, November 18, 2009 10:15 AM | Comments (9)
FredNUG Code Samples
Thanks to everyone who attended my presentation last night at FredNUG.  The code samples can be downloaded here.
Posted On Thursday, August 27, 2009 12:30 PM | Comments (0)
C# 3.0 Deep Dish with a slice of C# 4.0 – Code Samples
Thanks to everyone who attended my presentation last night at CapArea on C# 3.0 and C# 4.0. You can download the C# 3.0 code samples, C# 4.0 code samples, and the PowerPoint presentation from here. Several people asked me about some of the tools I was using during the presentation. A list of the tools that I use (and more) can be found here. Feel free to email me with any questions ......
Posted On Wednesday, August 26, 2009 10:04 AM | Comments (2)
Enterprise Library Validation Application Block with MVC Binders
A while back, I blogged about using the Enterprise Library Validation Application Block (VAB) with ASP.NET MVC. As MVC has matured as a framework, this scenario has becoming simpler. In early releases of MVC, I implemented the execution of the VAB validation in the controller methods. However, I now prefer to put that logic in the binders themselves. In earlier versions of the framework, the model binders that came out of the box dealt well with simple objects but if you had more complex View Models ......
Posted On Monday, March 16, 2009 11:17 PM | Comments (4)
Microsoft Tech Days – MVC Presentation

On April 1 I will be presenting ASP.NET MVC at Microsoft Tech Days.  This is a totally free 24-hour virtual event.  You can register right now at: Hope to see you there!

Posted On Saturday, March 14, 2009 12:34 AM | Comments (0)
Presentation at SOMD NUG – LINQ to SQL

Tomorrow I’ll be giving a presentation at Southern Maryland .NET User Group on LINQ to SQL.  Details of the event can be found here:

Posted On Sunday, March 8, 2009 8:46 PM | Comments (2)
Validation Application Block – Unit Test Validation Logic
The Enterprise Library Validation Application Block (VAB) is a great library for putting your validation in your business layer where it belongs rather than in the UI. It allows us to apply attributes to the properties of our business objects like this: 1: public class Person 2: { 3: [StringLengthValidator(1, 20, MessageTemplate="First Name must be between 1-20 characters.")] 4: public string FirstName { get; set; } 5: 6: [StringLengthValidator(1, 20, MessageTemplate="Last Name must be between 1-20 ......
Posted On Tuesday, January 27, 2009 10:27 PM | Comments (3)
Code Sample for Visual Studio Magazine MVC Article

It turns out the code sample that was posted online for my MVC Visual Studio Magazine article was an older version (based on a previous CTP). The latest version based on the MVC beta can be found here.  Let me know if any problems.

Posted On Tuesday, January 27, 2009 9:16 PM | Comments (0)
Full .NET 3.5 Archive

View Steve Michelotti's profile on LinkedIn

profile for Steve Michelotti at Stack Overflow, Q&A for professional and enthusiast programmers

Google My Blog

Tag Cloud