Showing posts with label Development. Show all posts
Showing posts with label Development. Show all posts

Monday, 23 February 2009

Html Encoding in MonoRail Views

I was surprised that there didn't seem to be a method for HTML encoding using the HtmlHelper in MonoRail. At least, that's what the assembly manifest and documentation would lead you to believe.

It turns out that there is an HtmlEncode method on the AbstractHelper base class, so you can just call HtmlHelper.HtmlEncode() after all!

Monday, 14 April 2008

Feeding Time for BigJump

We decided that the BigJump website was hungry for new, dynamic content. What better way to feed it than with our own blogs? We are going to publish this (my) blog and those of other BigJump staff, by importing the RSS feeds generated by Google Blogger, their original home.

Implementing this has given us the chance to utilise .net 3.5's Linq to XML facility, which we've used to parse the RSS. It turns out that Scott Guthrie has posted a guide on doing exactly this.

Wednesday, 9 April 2008

MonoRail Form Validation Documentation

This post describes how to use MonoRail's (v1.0 RC3) built in form validation.

The javascript validation used is Dexagogo's Really Easy Field Validation.

The error messages usually use the title attribute of the input field, which can be inserted automatically by MonoRail. In order to set a custom error message, add a div with id of the form: advice-element-id, where element-id is the id of the input field being validated.