Standard Controls—Enable you to render standard form elements such as buttons, input fields, and labels. We examine these controls in detail in Chapter 2, "Using the Standard Controls." Validation Controls—Enable you to validate form data before you submit the data to the server.
Every user interface text must be defined by using a label. A new label must be created for each new semantic use per each model. A label should have an uppercase first letter and all the other internal words should begins with lowercase.
These control naming conventions may help provide some organization. Visual Studio sets Name properties to defaults for controls, like Label2. Using these conventions it would be something like lblName.
The label control is used to display a text or a message to the user on the form. The label control is normally used along with other controls.
We are in the process of nutting out the design guidelines we would like to use in our development team and got into a discussion today around how ASP.NET controls should be named. I am talking about our good friends Label, TextBox, Button etc.
We came up with the following three possibilities that we voted on: (Example is a TextBox to enter/display a FirstName)
_
TextBox] or [FirstName_
tbx]We ended up deciding to use option 2. It's not as verbose as option 1 and I like that it specifies what control it is before the name of the control.
My question is whether Microsoft has released any guidelines for these prefixes and or if you have any comments about our decision.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With