views:

906

answers:

2

I'm trying out ASP.NET MVC 2 Preview and when I use client side validation it all works if the following:

<% Html.EnableClientValidation() %>

Is used on a content page. If it is on a Master Page - client side validation fails.

Is it just me or is this by design? If so - why?

+2  A: 

The answer is "it's just a preview." :) There will be bugs or other design nits - this being one of them - and they will hopefully be resolved in the future.

Levi
Are you SURE it's not by design? I can see some benefits of it (though there are more drawbacks). For example it makes it explicit where you want to have client side validation/where it is not needed.
Mikeon
Levi I kind of want to down vote you so you have 1337 REP. ;)
Nathan Taylor
@Mikeon - The design isn't finalized. This is one of the things we're still actively debating, as there are benefits to both supporting and not supporting it. For example, it's good from a readability perspective to force the call to enable client validation to occur in the same view as the call to BeginForm(). However, allowing you to enable client validation in the master page is good for setting the site default to be "client validation enabled," and if you need to disable it for a specific form you can do so just above the call to those particular BeginForm().
Levi
A: 

thanks for the detailed description - erx

Erx_VB.NExT.Coder