C#控件名缩写规范
基本类型:
数据类型缩写
string
str
int
i
char
chr
sbyte
sb
byte
bt
uint
ui
long
l
ulong
ul
float
f
double
d
bool
b
decimal
dec
web控件
控件名缩写
AdRotator
art
Button
btn
Calendar
cd
CheckBox
chk
CheckBoxList
chkl
CompareValidator
cpv
CustomValidator
ctv
DataGrid
dg
DataList
dl
DropDownList
ddl
HyperLink
htmlradio设置默认的按钮
hl
Image
img
ImageButton
Ibtn
Label
lbl
ListBox
lst
Panel
pl
PlaceHolder
ph
RadioButton
rb
RadioButtonList
rbl
RangeValidator
rv
RegularExpressionValidator
rev
Repeater
rp
RequiredFieldValidator
rfv
Table
tb
TableCell
tc
TableRow
tr
TextBox
txt
ValidationSummary
vs
XML
XML
html控件
控件名缩写
HtmlAnchor
hah
HtmlButton
hbtn
HtmlForm
hform
HtmlGenericControl
hgc
HtmlImage
himg
HtmlInputButton(按钮)
htxt
HtmlInputButton(重置)
hrbtn
HtmlInputButton(提交)
hcbtn
HtmlInputCheckBox
hick
HtmlInputFile
hifile
HtmlInputHidden
hihidden
HtmlInputImage
hiimg
HtmlInputRadioButton
hirb
HtmlInputText(密码)
hpwd
HtmlInputText(文本)
hitxt
HtmlSelect
hslt
HtmlTable
htab
HtmlTableCell
htc
HtmlTableRow
htr
HtmlTextArea
htxta
ADO.NET控件
命名规范
类型前缀示例
Connection
con
conNorthwind
Command
cmd
cmdReturnProducts
Parameter
parm
parmProductID
DataAdapter
dad
dadProducts
DataReader
dtr
dtrProducts
DataSet
dst
dstNorthWind
DataTable
dtbl
dtblProduct
DataRow
drow
drowRow98
DataColumn
dcol
dcolProductID
DataRelation
drel
drelMasterDetail
DataView
dvw
dvwFilteredProducts
WinForm Control 命名规范
数据类型
数据类型简写
标准命名举例
Label
lbl
lblMessage
LinkLabel
llbl
llblToday
Button
btn
btnSave
TextBox
txt
txtName
MainMenu
mmnu
mmnuFile
CheckBox
chk
chkStock
RadioButton
rbtn
rbtnSelected
GroupBox
gbx
gbxMain
PictureBox
pic
picImage
Panel
pnl
pnlBody
DataGrid
dgrd
dgrdView
ListBox
lst
lstProducts
CheckedListBox
clst
clstChecked
ComboBox
cbo
cboMenu
ListView
lvw
lvwBrowser
TreeView
tvw
tvwType
TabControl
tctl
tctlSelected
DateTimePicker
dtp
dtpStartDate
HscrollBar
hsb
hsbImage

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。