基础应用

关注公众号 jb51net

关闭
首页 > 网络编程 > ASP.NET > 基础应用 > .NET控件命名规范

.Net中控件的命名规则

作者:springsnow

这篇文章介绍了.Net中控件的命名规则,文中通过示例代码介绍的非常详细。对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

一、基本数据类型前缀

数据类型数据类型简写
Arrayarr
Booleanbln
Bytebyt
Charchr
DateTimedtm
Decimaldec
Doubledbl
Integerint
Longlng
Objectobj
Shortshr
Singlesng
Stringstr

二、ADO.NET对象前缀

控件类型控件类型简写
Commandcmd
Connectionconn
DataAdapterda
DataColumndcol
DataReaderdr
DataRelationDrel
DataRowdrow
DataSetds
DataTabletbl
DataViewdv
Parameterparm

三、WinForm Control 命名规范

控件类型控件类型简写
BackgroundWorkerbgw
BindingNavigatorbdn
BindingSourcebds
Buttonbtn
CheckBoxchk
CheckedListBoxclst
ColorDialogcdlg
ComboBoxcbo
ContextMenuStripcms
CrystalReportViewercrv
DataGriddgrd
DataGridViewdgv
DataSetdts
DateTimePickerdtp
DirectoryEntrydre
DirectorySearcherdrs
DomainUpDowndud
ErrorProvidererr
EventLogevl
FileSystemWatcherfsw
FlowLayoutPanelflp
FolderBrowserDialogfbdlg
FontDialogfdlg
Formfrm
GroupBoxgrp
HelpProviderhlp
HscrollBarhsb
ImageListilst
Labellbl
LinkLabelllbl
ListBoxlst
ListViewlvw
MainMenummnu
MaskedTextBoxmtx
MenuStripms
MessageQueuemsq
MonthCalendarcdr
NotifyIconicn
NumeircUpDownnud
OpenFileDialogofdlg
PageSetupDialogpsdlg
Panelpnl
PerformanceCounterpfc
PictureBoxpic
PrintDialogpdlg
PrintDocumentpdc
PrintPreviewControlprv
PrintPreviewDialogppd
Processprc
ProgressBarpgb
PropertyGridprg
RadioButtonrbtn
ReportDocumentrpd
ReportViewerrpv
RichTextBoxrtx
SaveFileDialogsfdlg
SerialPort spt
ServiceControllerscl
SplitContainerspc
Splitterspl
StatusBarstb
StatusStripss
TabControltab
TableLayoutPaneltlp
TextBoxtxt
Timertmr
ToolBartlb
ToolStripts
ToolStripButtontsbtn
ToolStripContainertsc
ToolStripDropDownButtontsddbtn
ToolStripLabeltslbl
ToolStripMenuItemtsmi
ToolStripSeparatortss
ToolStripSplitButtontssbtn
ToolTiptip
TrackBartrb
TreeViewtvw
VscrollBarvsb
WebBrowserwbs

四、WebControl 命名规范

控件类型控件类型简写
Adrotatoradrt
BulletedListblst
Buttonbtn
Calendarcal
CheckBoxchk
CheckBoxListchkl
CompareValidatorvalc
CustomValidatorvalx
DataGriddg
DataListdl
DetailsViewdtv
DropDownListddl
FileUpLoadfup
FormViewfmv
GridViewgrv
HiddenFieldhfld
HyperLinklnk
Imageimg
ImageButtonibtn
ImageMapimap
Labellbl
LinkButtonlbtn
ListBoxlst
Literalltl
Localizeloc
MultiViewmvw
Panelpnl
PlaceHolderplh
RadioButtonrad
RadioButtonListradl
RangeValidatorvalg
RegularExpressionreg
Repeaterrpt
RequiredFieldValidatorvalr
SubStitutionsubs
Tabletbl
TableCelltblc
TableRowtblr
TextBoxtxt
ValidationSummaryvals
Viewvw
Wizardwiz

到此这篇关于.NET控件命名规范的文章就介绍到这了。希望对大家的学习有所帮助,也希望大家多多支持脚本之家。

您可能感兴趣的文章:
阅读全文