I've been using FxCop for a while, almost all of the rules it suggests make sense, but when it comes to naming controls it throws a wobbly.
I tend to name things like this:
btnSavePerson lblForename txtPostcode ddlEthnicity
and so on.
Now, I only use prefixes for controls, I found that identifying them was a bit of a pain. I don't have this problem in all the rest of my code, so for a class representing a person I would have something like this:
public class Person
{
private string forename;
public string Forename
{
get;
set;
}
}
I seems daft for me to have two different naming conventions, FxCop complains about the prefix on the control names and I don't like the naming convention.
So how do people name controls on forms?