Saturday, June 4, 2011

HtmlTags 1.0 released

A new release of the HtmlTags library has been released. If you don’t know what the library does I suggest you take a look at the HtmlTags readme, and the Announcing HtmlTags 1.0 blog post.
 
The library allows you to create HTML tags in a fluent way, instead of the StringBuilder.
A quick example would be
Default way

@Html.TextBox("FirstName", "Lucas", new Dictionary<string, object> {{"id", "first-name"}, {"class", "required"})
Using HtmlTags

@Html.TextBoxTag("FirstName").Id("first-name").AddClass("required")

No comments:

Post a Comment