• C#控件命名规则


    Control Type                                     Prefix      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                                                   spn                   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控件命名规则

    类型

    前缀

    示例

    AdRotator

    adrt

    adrtTopAd

    Button

    btn

    btnSubmit

    Calendar

    cal

    calMettingDates

    CheckBox

    chk

    chkBlue

    CheckBoxList

    chkl

    chklFavColors

    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

  • 相关阅读:
    简单了解winform
    SqL语句基础之增删改查
    数据库之表
    数据库基本概念与操作
    搞死人不偿命的 Bank系统
    for的循环题
    .net framework 版本汇总
    LinqToEntity模糊查询的方法选择
    日常工作中的点滴:C# 根据字节长度截包含中文的字符串
    64位系统 IIS中应用程序池设置导致 访问数据库错误
  • 原文地址:https://www.cnblogs.com/menglin2010/p/2356869.html
Copyright © 2020-2023  润新知