Here is a best practice in naming your controls instance with behind these prefixes. I've collected this from andyyou - a GitHub account.
A
AdRotator arB
Button btnC
Calender calCheckBox chk
CheckBoxList chklst
Column (DataGridView) col
ColumnHeader (ListView) ch
Combobox cbo
CompareValidator cv
CrystalReportViewer rptvew
D
DataGrid dgDataGridView dgv
DataList dl
DomainUpDown dud
DropDownList ddl
F
FileUpload fulForm frm
G
GridView gvGroupBox grp
H
HiddenField hfI
Image imgImageButton imgbtn
ImageList il
L
Label lblLinkButton lnkbtn
ListBox lst
ListView lv
M
MenuStrip msO
ObjectDataSource odsP
PagedDataSource pdsPanel pnl
PictureBox pic
R
RadioButton rdoRadioButtonList rdolst
RangeValidator rv
RegularExpressionValidator rev
Repeater rpt
RequiredFieldValidator rfv
S
StatusLabel slblStatusStrip ss
T
TabControl tabTable tbl
TabPage tp
TextBox txt
Timer tmr
ToolStrip ts
ToolStripButton tsbtn
ToolStripDropDownButton tsddb
ToolStripLabel tslbl
ToolStripMenuItem tsmi
TreeView tv/tvw
V
ValidatorSummary vsW
WebBrowserLink: https://gist.github.com/andyyou/3052671
HAI DUONG
Nhận xét
Đăng nhận xét