Visual Studio C#的winform/webform/asp.net控制項命名規範

來源:互聯網
上載者:User

標籤:

控制項命名規範

類型 首碼 樣本
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 ddl ddlCountries
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

ADO.NET控制項命名規範

類型 首碼 樣本
Connection con conNorthwind
Command cmd cmdReturnProducts
Parameter parm parmProductID
DataAdapter dad dadProducts
DataReader dtr dtrProducts
DataSet dst dstNorthWind
DataTable dtbl dtblProduct
DataRow drow drowRow98
DataColumn dcol dcolProductID
DataRelation drel drelMasterDetail
DataView dvw dvwFilteredProducts

變數命名規範

類型 首碼 樣本
Array arr arrShoppingList
Boolean bln blnIsPostBack
Byte byt bytPixelValue
Char chr chrDelimiter
DateTime dtm dtmStartDate
Decimal dec decAverageHeight
Double dbl dblSizeofUniverse
Integer int intRowCounter
Long lng lngBillGatesIncome
Object obj objReturnValue
Short shr shrAverage
Single sng sngMaximum
String str strFirstName

-----------------------------

控制項名

簡寫

控制項名

簡寫

Web Form
Label

lbl

TextBox

tb

Button

btn

LinkButton

lb

HyperLink

hl

Repeator

rpt

ImageButton

ib

DropDownList

ddl

ListBox

lb

DataGrid

dg

DataList

dl

CheckBox

cb

CheckBoxList

cbl

RadioButton

rb

RadioButtonList

rbl

Image

img

Panel

pnl

Calender

cld

AdRotator

ar

Table

tbl

PlaceHolder

ph

Xml

xml

RequiredFieldValidator

rfv

CompareValidator

cv

RangeValidator

rv

RegularExpressionValidator

rev

ValidatorSummary

vs

CustomValidation

cv

Literal

ltl

TreeView

tv

資料
DataSet

ds

DataTable

dt

DataView

dv

SqlConnection

sc

SqlDataAdapter

sda

SqlCommand

sc

HTML
Label

lbl

Button

btn

Reset Button

rb

Submit Button

sb

Text Field

tf

Text Area

tr

File Field

ff

Password Field

pf

Checkbox

cb

Radio Button

rb

Hidden

hdn

Table

tbl

Flow Layout Panel

flp

Grid Layout Panel

glp

Image

img

Listbox

lb

常用詞縮寫
Argument

Arg

Maximum

Max

Buffer

Buf

Message

Msg

Clear

Clr

Minimum

Min

Clock

Clk

Multiplex

Mux

Compare

Cmp

Operating System

OS

Configuration

Cfg

Overflow

Ovf

Context

Ctx

Parameter

Param

Delay

Dly

Pointer

Ptr

Device

Dev

Previous

Prev

Disable

Dis

Priority

Prio

Display

Disp

Read

Rd

Enable

En

Ready

Rdy

Error

Err

Register

Reg

Function

Fnct

Schedule

Sched

Hexadecimal

Hex

Semaphore

Sem

High Priority Task

HPT

Stack

Stk

I/O System

IOS

Synchronize

Sync

Initialize

Init

Timer

Tmr

Mailbox

Mbox

Trigger

Trig

Manager

Mgr

Write

Wr

一些在軟體中常用的反義片語

add/remove

begin/end

create/destroy

insert/delete

first/last

get/release

increment/decrement

put/get

add/delete

lock/unlock

open/close

min/max

old/new

start/stop

next/previous

source/target

show/hide

send/receive

source/destination

cut/paste

up/down

Visual Studio C#的winform/webform/asp.net控制項命名規範

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.