当前位置:首页>>开发编程>>VS.NET>>新闻内容
VS.NET 2003 控件命名规范
作者:佚名 发布时间:2004-7-21 17:25:59 文章来源:西部E网

Type

Prefix

Example

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

 

WebControls

Type

Prefix

Example

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

 

ADO.NET

Type

Prefix

Example

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

Event-Handling Subroutines

The name of an event-handling subroutine will consist of the ID of the control that rasied the event followed by the type of event being handled. For example, a subroutine named btnSubmit_Click handles the Click event of a Button control named btnSubmit.

When a control that raises an event is not assigned an ID, the type of the control is used instead of the ID. For example, the subroutine named Button_Click handles the Click event of a Button control without an ID.


最新更新
·C#中使用Split分隔字符串的技
·VS2008开发中Windows Mobile
·PC机和移动设备上绝对路径的
·C#程序加壳的方法(使用Sixx
·当前上下文中不存在名称Conf
·请插入磁盘:Visual Studio 2
·用VS.NET读取Flash格式文件信
·在ASP.NET中使用AJAX的简单方
·VS.NET 2005中常用的一些代码
·安装VS.NET 2005 SP1补丁全攻
相关信息
·VS2008开发中Windows Mobile 5.0 emulator连网的配置
·C#程序加壳的方法(使用Sixxpack)
·当前上下文中不存在名称ConfigurationManager的解决方法
·请插入磁盘:Visual Studio 2005 DVD
·用VS.NET读取Flash格式文件信息
·VS.NET 2005中常用的一些代码
·安装VS.NET 2005 SP1补丁全攻略
·VS.NET 2005 常用的快捷键大全
·VS.NET2005智能感知失效的解决办法
·VS.NET 2005 + VSS6.0简单应用示例
画心
愚爱
偏爱
火苗
白狐
画沙
犯错
歌曲
传奇
稻香
小酒窝
狮子座
小情歌
全是爱
棉花糖
海豚音
我相信
甩葱歌
这叫爱
shero
走天涯
琉璃月
Nobody
我爱他
套马杆
爱是你我
最后一次
少女时代
灰色头像
断桥残雪
美了美了
狼的诱惑
我很快乐
星月神话
心痛2009
爱丫爱丫
半城烟沙
旗开得胜
郎的诱惑
爱情买卖
2010等你来
我叫小沈阳
i miss you
姑娘我爱你
我们都一样
其实很寂寞
我爱雨夜花
变心的玫瑰
犀利哥之歌
你是我的眼
你是我的OK绷
贝多芬的悲伤
哥只是个传说
丢了幸福的猪
找个人来爱我
要嫁就嫁灰太狼
如果这就是爱情
我们没有在一起
寂寞在唱什么歌
斯琴高丽的伤心
别在我离开之前离开
不是因为寂寞才想你
爱上你等于爱上了错
在心里从此永远有个你
一个人的寂寞两个人的错