I have (once or twice) seen a listing of naming conventions in the back of
MS Press books; not lately though.
Be sure to extend this to database field names - I think prefixing db
variables is the most important thing to prefix, for clarity and also to
help ensure reserved name compatibility. I've often seen a goofy field name
in an access database, but the second it is ported to sql or oracle or
something, that field name they used now conflicts with a reserved keyword.
txt or str for strings
int, num, lng, etc for various numeric formats..
bln or bit for bit type variables (or boolean, or whatever)..
guid for unique identifiers
frm for form.. cls for class prefixes (although I personally never prefix
classes because it makes em look ugly!)
txt for text fields, frm for frames.. opt for like radio buttons (or your rb
works too)
mnu for a menu, cb or chk for a check box; lst or lv for a list view
control; dg for data grid, or grd for an unbound grid.
tv for a treeview control, tab for a tab control, rtf for rick text control,
dlg for a dialog control (regardless of what type of dialog)..
I'll leave for others to add to the list - when you are done, you should
post the list back into this list - as it is helpful to the development
community.. I bet there's a "complete" list somewhere on the net, there HAS
to be.
Quote:
> I'm working on a Standards document for use in our department.
> Does anyone know if Microsoft has any suggested naming conventions for
their
> controls?
> Currently I use an abbreviation if the control has one word or the first
> letter of each word is the control name is made up of multiple words. For
> example:
> btn = Button
> lbl = Label
> rfv = RequiredFieldValidator
> dg = DataGrid
> rb = RadioButton
> ddl = DropDownList
> This works for us programmers here but we have contractors come in every
> once in a while and I'm looking for something that people most commonly
use
> to increase the maintainability of our apps.
> Thanks,
> Mark