Incompatibilities in MVC futures

As has been posted on a few other blogs, there are some features of ASP.NET MVC 2 Futures that don't play nicely together.

Two features in particular are the validation (both MS Ajax and JQuery) and the generic form methods.

Here's a (working) example of a very simple form with the plain, non-generic MVC method:
<% Html.EnableClientValidation(); %>
 <% using (Html.BeginForm("Register", "Account", FormMethod.Post, new { model = "" })) { %>
 <%: Html.TextBoxFor(m => m.UserName) %>
 <%: Html.ValidationMessageFor(m => m.UserName) %>
 <input type="submit" value="Register" />
<% } %>

But the following does not work:
<% Html.EnableClientValidation(); %>
<% using (Html.BeginForm(x => x.Register(null))) { %>
  <%: Html.TextBoxFor(m => m.UserName) %>
  <%: Html.ValidationMessageFor(m => m.UserName) %>
  <input type="submit" value="Register" />
<% } %>


When this is run, it produces a JavaScript error along the lines of "formElement is null".

I do not  currently have a workaround for this (other than using the plain method). But it looks to me like the problem lies in the default ids for the form elements which the regular ASP.NET MVC method produces. The non-generic method creates an id for each form on the page (form0, form1, ...) but Futures does not. Read more

Web Tester

The hardest bugs to fix in software development are often concurrency problems. That is, bugs which are hard to find as they rely on multiple events occurring at overlapping intervals - often impossible to recreate reliably.

Read more

MbUnit profiling with PowerShell

Recently at work, our unit tests have been taking a while to run. This could be something to do with having over 4000 of them on a single project (and it looks like the answer to this is going to simply be that we don't need to run all of them all the time). But it would be nice to dig into what's happening.

Read more

Subversion - Not enough space on the disk

A quick tip...

Using Subversion (via Tortoise, incidentally), I recently got this error:
svn:
Can't set position pointer in file 'C:\WINDOWS\TEMP\report.tmp':
There is not enough space on the disk.

This means you have run out of space on your server.

Sounds straight forward, but it took a while fooling around on the client and binging to find an answer. Read more

Crypt Kicker Solution Design

I participate in ‘the Calgary book club’, several developers come together every couple of weeks to discuss a book we’ve all been reading. Currently we’re working our way through Steven Skiena’s Algorithm Design Manual. It’s a pretty good walk through a lot of computer science fundamentals, particularly for those of us who didn’t study a straight CS course at university. Read more