VS.NET 2003 naming control norms
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.
Bookmark it:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags: 2003, control
Releated Articles
On
XML @ 27/12/2006 | By admin
1. Variable naming standards
Examples of types prefix 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. Control norms named
Examples of types prefix 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 control norms named
Examples of types prefix 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. Incident subprogram
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.
Bookmark it:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags: 2003, control
Releated Articles
On
XML @ 20/03/2002 | By admin
0 Comments to “VS.NET 2003 naming control norms!”
No Comments. Send your comment.
Leave a Reply
You must be logged in to post a comment.