惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
博客园 - 司徒正美
D
Docker
B
Blog
V
Visual Studio Blog
Blog — PlanetScale
Blog — PlanetScale
U
Unit 42
S
SegmentFault 最新的问题
小众软件
小众软件
J
Java Code Geeks
美团技术团队
腾讯CDC
MyScale Blog
MyScale Blog
爱范儿
爱范儿
H
Help Net Security
宝玉的分享
宝玉的分享
Microsoft Azure Blog
Microsoft Azure Blog
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
博客园 - 【当耐特】

博客园 - David.C

ASP.net 验证码(C#) 这是我最近从网上摘抄的.net笔试题 office应用小技巧 正确显示出Word中的空格 仓库管理系统解决方案 餐饮业点菜系统解决方案 餐饮服务案例分析(预订) Asp.Net在SqlServer中的图片存取技术 Asp.Net安全验证小结 - David.C - 博客园 客户关系管理的三大纪律 软件工程---网站项目管理 电子政务与办公自动化初探 详解加密技术概念、加密方法以及应用 痛苦的选择:不再只专注于技术(转载--http://zhenyulu.cnblogs.com/archive/2004/10/17/53443.aspx) 在C#中调用Microsoft.VisualBasic命名空间下的类型验证函数 用C#实现基于用C#实现基于TCP协议的网络通讯 MSDN 文章收藏 数据访问:使用 ADO.NET 的最佳实践(ADO.NET 技术文档) ASP.NET编程中的十大技巧 用ASP.NET上传图片并生成可带版权信息的缩略图
VS.NET 2003 控件命名规范
David.C · 2005-09-26 · via 博客园 - David.C

1.变量命名规范

类型
前缀 示例
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

2.控件命名规范

类型 前缀 示例
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

3.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

4.事件处理子程序

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.

posted on 2005-09-26 01:44  David.C  阅读(372)  评论()    收藏  举报