• 选择页面风格:
  • Hi,飞龙网络欢迎您!
  • 登录 注册QQ号登陆 快速发布
  • C#控件命名规范

    作者:追梦 更新时间:2017-12-20 14:54:04 来源:原创 【字号: 】 浏览

    Data Control

    类 型前 缀示 例
    AccessDataSourceadsadsPubs
    DataListdlstdlstTitles
    DetailViewdvwdvwTitles
    FormViewfvwfvwFonts
    GridViewgvwgvwCity
    ObjectDataSourceodsodsMenus
    RepeaterrptrptQueryResults
    ReportViewerrvwrvwRecord
    SiteMapDataSourcesmdssmdsSite
    SqlDataSourcesdssdsBooks
    XmlDataSourcexdsxdsTitles

     Validation Control

    类 型前 缀示 例
    CompareValidatorvalcvalcValidAge
    CustomValidatorvalxvalxDBCheck
    RangeValidatorvalgvalgAge
    RegularExpressionValidatorvalevaleEmail
    RequiredFieldValidatorvalrvalrFirstName
    ValidationSummaryvalsvalsFormErrors

     Navigation Control

    类 型前 缀示 例
    MenumnumnuUser1
    SiteMapPathsmpsmpSite1
    TreeViewtrvwtrvwMenu

     Login Control

    类 型前 缀示 例
    ChangePasswordcpwdcpwdUser1
    CreateUserWizardcuwcuwLogin
    LoginloglogCenter
    LoginNamelognlognUser
    LoginStatuslogslogsUser
    LoginViewlogvlogvUser
    PasswordRecoverypwdrpwdrUser

     WebParts Control

    类 型前 缀示 例
    AppearanceEditorPartpaedpaedPart1
    BehaviorEditorPartpbedpbedPart2
    CatalogZonezcazcatCity
    ConnectionsZonezconzconDataBase
    DeclarativeCatalogPartpdcapdcaPart1
    EditorZonezedzedNews
    ImportCatalogPartpicapicaPart
    LayoutEditorPartpledpledNews
    PageCatalogPartppcappcaMail
    PropertyGridEditorPartppgeppgeServer
    ProxyWebPartManagermpwpmpwpWeb
    WebPartManagermwpmwpSite1
    WebPartZonezwpzwpSite2


    基本数据类型

    数据类型

    数据类型简写

    标准命名举例

    Array

    arr

    arrShoppingList

    Boolean                        blnblnIsPostBack
    Byte                          bytbytPixelValue
    Char                           chrchrDelimiter
    DateTime                      dtmdtmStartDate
    DecimaldecdecAverageHeight
    Double                          dbldblSizeofUniverse
    Integer        intintRowCounter
    Long                             

    lng

    lngBillGatesIncome

    Object          obj                 objReturnValue
    ShortshrshrAverage
    SinglesngsngMaximum
    String

    str

    strFirstName

    ADO.NET 命名规范

    数据类型数据类型简写标准命名举例
    ConnectionconconNorthwind
    CommandcmdcmdReturnProducts
    ParameterparmparmProductID
    DataAdapterdaddadProducts
    DataReaderdtrdtrProducts
    DataSetdstdstNorthWind
    DataTabledtbldtblProduct
    DataRowdrowdrowRow98
    DataColumndcoldcolProductID
    DataRelationdreldrelMasterDetail
    DataViewdvwdvwFilteredProducts

    WinForm Control 命名规范


    数据类型数据类型简写标准命名举例
    LabellbllblMessage
    LinkLabelllblllblToday
    ButtonbtnbtnSave
    TextBoxtxttxtName
    MainMenummnummnuFile
    CheckBoxchkchkStock
    RadioButtonrbtnrbtnSelected
    GroupBoxgbxgbxMain
    PictureBoxpicpicImage
    PanelpnlpnlBody
    DataGriddgrddgrdView
    ListBoxlstlstProducts
    CheckedListBoxclstclstChecked
    ComboBoxcbocboMenu
    ListViewlvwlvwBrowser
    TreeViewtvwtvwType
    TabControltctltctlSelected
    DateTimePickerdtpdtpStartDate
    HscrollBarhsbhsbImage
    VscrollBarvsbvsbImage
    TimertmrtmrCount
    ImageListilstilstImage
    ToolBartlbtlbManage
    StatusBarstbstbFootPrint
    OpenFileDialogodlgodlgFile
    SaveFileDialogsdlgsdlgSave
    FoldBrowserDialogfbdlgfgdlgBrowser
    FontDialogfdlgfdlgFoot
    ColorDialogcdlgcdlgColor
    PrintDialogpdlgpdlgPrint


    WebControl 命名规范

    类 型前 缀示 例
    AdrotatoradrtadrtTopAd
    BulletedListblstblstCity
    ButtonbtnbtnSubmit
    CalendarcalcalMettingDates
    CheckBoxchkchkBlue
    CheckBoxListchklchklFavColors
    CompareValidatorvalcvalcValidAge
    CustomValidatorvalxvalxDBCheck
    DropDownListdropdropCountries
    DataGriddgrddgrdTitles
    DataListdlstdlstTitles
    RangeValidatorvalgvalgAge
    FileUpLoadfupfupImage
    HiddenFieldhfldhfldName
    HyperLinkhlkhlkDetails
    ImageimgimgAuntBetty
    ImageButtonibtnibtnSubmit
    ImageMapimapimapSite
    LabellbllblResults
    LinkButtonlbtnlbtnSubmit
    ListBoxlstlstCountries
    LiteralltlltlTitle
    LocalizeloclocChina
    MultiViewmvwmvwForm1
    PanelpnlpnlForm2
    PlaceHolderplhplhFormContents
    RadioButtonradradFemale
    RadioButtonListradlradlGender
    RegularExpressionvalevaleEmail_Validator
    RepeaterrptrptQueryResults
    RequiredFieldValidatorvalrvalrFirstName
    SubStitutionsubssubsTime
    TextBoxtxttxtFirstName
    TabletbltblCountryCodes
    TableCelltblctblcGermany
    TableRowtblrtblrCountry
    ValidationSummaryvalsvalsFormErrors
    ViewvwvwCity
    WizardwizwizRegister
    XmlxmlxmlBooks


    您看完此刻的感受是! 已有0人表态:
    0
    0
    0
    0
    0
    0
    0
    0
    惊呀 欠揍 支持 很棒 愤怒 搞笑 恶心 不解
    {$FL_ggad250}
    栏目导航