Can ASP.NET MVC generate elements with lower case name and id attributes

Viewed 1535

I hate that ASP.NET html helpers generates name and id attributes in the same case as the POCO properties.

Most developers typically use lower case values for name and id but I cannot seem to find a way to accomplish this in ASP.NET MVC.

A look through the source shows that there is no way to override this functionality, but I could be wrong.

Is this at all possible?

EDIT: I'll be more specific, with examples of what I am talking about since there seems to be some confusion.

My model looks like this:

public class Customer
{
    public string FirstName { get; set; }
    public string LastName { get; set; }
}

In my view I use Html herlpers like so:

@Html.InputFor(m => m.FirstName)

This generates markup that looks like this:

<input type="text" name="FirstName" id="FirstName" value="" />

I hate that the FirstName property is capitalized. In a perfect world, I would like a way to override the generation of this attribute value such that I can make it say "firstName" instead.

I do not want to change the POCO property names to be lower case. So much of the ASP.NET MVC framework is extensible and customizable - is this something that is not?

1 Answers
Related