C # control naming rules

Source: Internet
Author: User

Control TypePrefix Example

Button btn btnOK

Grid grd grdPrices

3D Panel pnl pnlGroup

ADO Data ado adoBiblio

Animated button ani aniMailBox

Check box chk chkReadOnly

Combo box cbo cboEnglish

Dropdown list box ≥ ddl ddlUser

Command button cmd cmdExit

Common dialog dlg dlgFileOpen

Communications com comFax ≤

Control (used within procedures when the specific type is unknown)

Ctr ctrCurrent

Data dat datBiblio

Data-bound combo box dbcbo dbcboLanguage

Data-bound grid dbgrd dbgrdQueryResult

Data-bound list box dblst dblstJobType

Data combo dbc dbcAuthor

Data grid dgd dgdTitles

Data list dbl dblPublisher

Data repeater drp drpLocation

Date picker dtp dtpPublished

Directory list box dir dirSource

Drive list box drv drvTarget

File list box fil filSource

Flat scroll bar fsb fsbMove

Form frm frmEntry

Frame fra fraLanguage

Gauge gau gauStatus

Graph gra graRevenue

Hierarchical flexgrid flex flexOrders

Horizontal scroll bar hsb hsbVolume

Image img imgIcon

Image combo imgcbo imgcboProduct

ImageList ils ilsAllIcons

Label lbl lblHelpMessage

Lightweight check box lwchk lwchkArchive

Lightweight combo box lwcbo lwcboGerman

Lightweight command button lwcmd lwcmdRemove

Lightweight frame lwfra lwfraSaveOptions

Lightweight horizontal scroll bar lwhsb lwhsbVolume

Lightweight list box lwlst lwlstCostCenters

Lightweight option button lwopt lwoptIncomeLevel

Lightweight text box lwtxt lwoptStreet

Lightweight vertical scroll bar lwvsb lwvsbYear

Line lin linVertical

List box lst lstPolicyCodes

ListView lvw lvwHeadings

MAPI message mpm mpmSentMessage

MAPI session mps mpsSession

MCI mci mciVideo

Menu mnu mnuFileOpen

Month view mvw mvwPeriod

MS Chart ch chSalesbyRegion

MS Flex grid msg msgClients

MS Tab (mst mstFirst)

OLE container ole oleWorksheet

Option button opt optGender

Picture box pic picVGA

Picture clip clp clpToolbar

ProgressBar prg prgLoadFile

Remote Data rd rdTitles

RichTextBox rtf rtfReport

Shape shp shpCircle

Slider sld sldScale

Spin spnPages

StatusBar sta staDateTime

SysInfo sys sysMonitor

TabStrip tab tabOptions

Text box txt txtLastName

Timer tmr tmrAlarm

Toolbar tlb tlbActions

TreeView tre treOrganization

UpDown upd updDirection

Vertical scroll bar vsb vsbRate

ASP. NET control naming rules

Type

Prefix

Example

AdRotator

Adrt

AdrtTopAd

Button

Btn

BtnSubmit

Calendar

Cal

CalMettingDates

CheckBox

Chk

ChkBlue

CheckBoxList

Chkl

Chklkavcolors

CompareValidator

Valc

ValcValidAge

CustomValidator

Valx

ValxDBCheck

DataGrid

Dgrd

DgrdTitles

DataList

Dlst

DlstTitles

DropDownList

Drop

DropCountries

HyperLink

Lnk

LnkDetails

Image

Img

ImgAuntBetty

ImageButton

Ibtn

IbtnSubmit

Label

Lbl

LblResults

LinkButton

Lbtn

LbtnSubmit

ListBox

Lst

LstCountries

Panel

Pnl

PnlForm2

PlaceHolder

Plh

PlhFormContents

RadioButton

Rad

RadFemale

RadioButtonList

Radl

RadlGender

RangeValidator

Valg

ValgAge

RegularExpression

Vale

ValeEmail_Validator

Repeater

Rpt

RptQueryResults

RequiredFieldValidator

Valr

ValrFirstName

Table

Tbl

TblCountryCodes

TableCell

Tblc

TblcGermany

TableRow

Tblr

TblrCountry

TextBox

Txt

TxtFirstName

ValidationSummary

Vals

ValsFormErrors

XML

Xmlc

XmlcTransformResults

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.