Wednesday, January 9, 2008

General practices

MAXLENGTH:The maxlength of each control should be 1 minus the length set in the corresponding column length in databasee.g. fname = 256 in DB
front end- First Name = 255 should be set (even smaller than this is good)
Be careful while setting the column length: Please set minimum required length e.g. for first name 100 characters are to much. If we set 255 for this, that would be a wastage. Specially for char datatype
for username/password/security answer fields: maxlength should not be too large.

FOCUS:Cursor Focus should come at very first control of the form on the page. e.g. first name is the first control on the page, so cursor should focus in this automatically on page load
VALIDATORS:When validation fails, form should not submit i.e. no postback. on enter keypress form should not be submitted till validation messages appearPlease set SetFocusOnError="True" ValidationGroup="name"for all validators.all validators should fire on client side first.

BLANK FORM VALUES:if after submission of any form , if same page appears again, then all textbox/contols should get cleared.
INVALID CHARACTERS:Invalid characters should not be allowed in inputs.Proactive Strategy: e.g. phone textbox, if 0-9 & hypen is allowed in it.Then other characters should not be typed in this textbox.If somebody types invalid character, message should appear

No comments: