tags:

views:

11

answers:

0

ASP.NET 4.0 has introduced the property 'ClientIDMode', which allows one to specify how the html element's ids are rendered in the output html.

My project is currently set to 'Static' (the shortest / contains no hierarchy id's)

When using any validator (RequiredFieldValidator, RegularExpressionValidator...), unless the control it's validating explicitly has it's property ClientIDMode:AutoID I get the error:

Input parameter 'controlId' cannot be an empty string.

Is this the expected behaviour?

Edit: Being abit dumb with the error message, it wanted me to put an id on the Validator, which I obviously dont do (unless I need to reference it).

It still seems odd that it should fail because of this reason.