Pages

Friday, June 26, 2009

ASP.NET Coding Standards and Guidelines

ASP.NET Coding Standards and Guidelines


1. Prefix user control names with “uc”

2. The rest of the user control name should be in Pascal Casing (Ex. ucMyUserControl)

3. Do not use session variables throughout the code. Use session variables only within the classes and expose methods to access the value stored in the session variables.

4. Do not store large objects in session, it may consume lot of server memory depending on the number of users.

5. Always use style sheet to control the look and feel of the pages.

6. Categories data and store it in predefine folder depending on its working.(e.g.- store all images, sound, video files in media or image folder)

Control NameAbbreviations/ PrefixesRemarks
Formwf,frm
TextboxTxt
TextAreaTxa
CheckboxChk
Check Box ListChklstchklstCurrency
LabelLbl
Hidden ElementsHdn
Combo Box / Drop DownCbo
Buttoncmd,btn
Submit Buttonsmt
Reset Buttonrst
Link ButtonlbtnlbtnSave
Image ButtonibtnibtnExit
Password Fieldpwd
Radio Buttonopt
Radio Button ListoptlstoptlstSelect
List Boxlst
Framefra
Imageimg
Pointerptr
Panelpan,pnlpnlBackground
Place Holderplh
Calendarcal
Ad Rotatoradr
TabletbltblAppointments
Range Validatorrav,rgv
Regular Expression Validatorrev
Regular Field Validatorrfv
Compare Validatorcmv
Custom Validatorcuv,csv
Validation Summaryvsm
XMLXmlXmlDataFile
File FieldFle
LiteralLit
ArraylistAl
Hyperlinkhyp
DataGriddtg,dgr
DataListdtl
RepeaterrptrptReport
Flow Layout Panelflp
Grid Layout Panelglp
Horizontal Rulehr
Crystal Report Viewercrv,crvrcrvReport


Main Article

Thanks
Anil Kumar Pandey
System Architect
Green Point Technology (India) Ltd.
Mumbai, Maharshtra
INDIA

No comments:

Post a Comment

Kontera