Web Application Development Advice & How To
Active Server Pages Development Advice & How To

Shining Star Services LLC
 
Shining Star Services
Articles
ASP.NET
ASP.net Articles
ASP, DHTML, HTML
HTML Tutorial
Auto-select an Element from a Menu or Scrolling List & Save Keystrokes!
ASP Driven DHTML Slider Menus REVISITED One Year Later! Part II
ASP Driven DHTML Slider Menus
ASP Driven HTML Outlines
Reusing Code with ASP Include Files and Subroutines
Security
Hacker Query Check
.htr IIS Security Issue
Databases, Cookies
Functions to Open a Database Connection and Record Set
Setting Up and Using OraSession to Manage Your Oracle Database Objects
Storing Non-Durable Data for Cookie-less Sessions
Javascript
Smart Popups
Javascript: Validate Numeric Fields
Javascript Confirm Form Submission
Javascript Dynamic Text Area Counter
Javascript: Check All and Uncheck All Check Boxes
Javascript Field Validations -- Client Side Scripting
Miscellaneous
Tree Select Demo
Adobe Extension Manager
Scandisk & Defrag Pointers
Standards & Style
Setting Up Your Own ASP Development Templates
Creating a Project Template for Estimations of Time, Tasks, and Resources
To Host or Not To Host
ASP Naming Conventions
HTML Naming Conventions & Visual Interdev HTML Generation
Working with and in spite of the Visual Interdev Design Mode
Commenting Your ASP Source Code
Letters!
Reader Letters

Articles Home

Shining Star Services

 
HTML Naming Conventions & Visual Interdev HTML Generation
By Nannette Thacker - 05/05/1999

In Visual Interdev 6.0, an HTML Toolbox allows the user to click on a button and produce automatic HTML coding:

<INPUT type="text" id=text1 name=text1>

However, the code created needs edited in order to make it useable. For instance, there should be a Size value, indicating the maximum length displayed on the screen. There should be a MaxLength value indicating the maximum number of characters allowed for input.

If you're using values from a form to populate a database table, you will find the MaxLength field invaluable for eliminating database errors when saving. The MaxLength field should match the database table field length.

And finally, you will want to use HTML naming conventions when naming the ID and NAME.

< INPUT TYPE="text" SIZE="50" MAXLENGTH="50" NAME="txtSearch" VALUE="Enter Search Value Here">

You may edit these values manually, or you may use the Properties screen (right click on the HTML code and select Properties) to edit these values. I personally prefer to edit all of my HTML code manually. I don't care for the way the Design mode formats HTML. See my tips on using the Design mode without messing up your HTML formatting: Working with and in spite of the Visual Interdev Design Mode.

Below are suggested Names for each form type. However, you may use your own. The key is to be consistent throughout your coding, so that any developer, including yourself, can later read your source code and easily tell what is happening. Instead of "checkboxGender" you may wish to use "ckGender" or "cbxGender." What you use is insignificant as long as all checkboxes have the same prefix and the prefix makes the type identifiable.

If you're working with a team of developers, have the team create naming standards and styles.

Data Type

Name

 

text

txtFirstName

password

pwdLogin

file

fileUpload

 

checkbox

checkboxGender

radio

radioEducation

select
(drop down or list box)

listState, listCountry

submit

submitButton

reset

resetButton

button

btnButton

 



ChristianSinglesDating

ShiningStar.net | ShiningStarSingles.com | Christian911.com