Control Naming Conventions for ASP.NET
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.
ASP.NET Control Naming Conventions
ASP.NET Control Naming Conventions are prefixed to the name, such as, lblName or rptEmployee.
Control Naming Conventions List
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
Naming Convention - Control
btn - Button
cb - CheckBox
cbl - CheckBoxList
ddl - DropDownList
dtv - DetailsView
fmv - FormView
grdv - GridView
hl - Hyperlink
img - Image
ib - ImageButton
lbl - Label
lbtn - LinkButton
lb - ListBox
lit - Literal
mnu - Menu
pnl - Panel
ph - PlaceHolder
rb - RadioButton
rbl - RadioButtonList
rpt - Repeater
sql - SqlDataSource
txt - Textbox
|
If I’ve left a naming convention out please feel free to comment. I will update the Naming Convention List later. Additionally, comment if you use something different.
No comments:
Post a Comment