473,473 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Naming Controls


With dotnet, everyone has said that you should no longer use hungarian notation
to name your objects. So, no more strName or intCount.

Okay, but what about controls on forms. If you have a button that is the
"okay" button, I can't see how naming it "Okay" makes any sense.

Thoughts?
Nov 17 '05 #1
3 1225
I'd call it btnOkay, but then I still use strName.
"Brian Corcoran" <fa**@email.com> wrote in message
news:27*********************@news.microsoft.com...

With dotnet, everyone has said that you should no longer use hungarian notation to name your objects. So, no more strName or intCount.

Okay, but what about controls on forms. If you have a button that is the
"okay" button, I can't see how naming it "Okay" makes any sense.

Nov 17 '05 #2
For controls I still find it useful to use btoButton or btnButton so that it
is easier to find in dropdown help. However I don't use hungarian for
variables.

-Greg McCallum

"James Curran" wrote:
I'd call it btnOkay, but then I still use strName.
"Brian Corcoran" <fa**@email.com> wrote in message
news:27*********************@news.microsoft.com...

With dotnet, everyone has said that you should no longer use hungarian

notation
to name your objects. So, no more strName or intCount.

Okay, but what about controls on forms. If you have a button that is the
"okay" button, I can't see how naming it "Okay" makes any sense.


Nov 17 '05 #3
Just don't use button1, button2, etc.
You'd be surprised that some people do!

-Eric
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Patrick Kristiansen | last post by:
Hello group! If a company is called for examle ABC, what would be the best practice for naming a namespace. Which one of the following is preferred according to Microsoft guidelines: ...
1
by: Lalit | last post by:
Hi Friends, We are defining coding standards for our company. In MSDN i have seen that hungarian notation will not be used in naming of variables etc. What about the controls ? Should we...
4
by: Mark Broadbent | last post by:
stupid question time again to most of you experts but this is something that continually bothers me. I am trying to get into the habit of naming variables and controls in an assembly as per...
4
by: =B= | last post by:
Hi, I was wondering if anyone has any opinions on naming conventions for ASP.NET objects? Up until now I've been using txtThis for Text Boxes, ddlThat for DropDownList, etc because I think it...
2
by: Nikolay Anestev | last post by:
Hi all. I have the following problem: In an ASP.NET (C#) application i wrote some client-side script which works with some of the page controls. When the page content is rendered i see that some of...
4
by: Patrick | last post by:
what are the general naming conventions for vb.net controls. esp txtUserName, lblPassword, btnSubmit What are the prefixes for the controls???? I've tried to search hi and low on the net, but...
9
by: kevininstructor | last post by:
Greetings, I am in the process of creating naming conventions for VB.NET controls i.e. CheckBox -> chkShowThisOnStartup ListBoxt -> lstSomeList What I am looking for other developers...
4
by: Sturdy | last post by:
Hi, I'm new to C# and .NET. I'm a first time user of Visual C# 2005 Express and have a very basic question. I've looked at several links and lots of docs but can't find any tips on naming multiple...
3
by: catharticmomentusenet | last post by:
I apologise because I am aware there have already been a large number of posts on this topic, but I couldn't find one making precisely the points I wanted to make :-) I am a senior developer at...
3
by: Nathan Sokalski | last post by:
I have written a custom control that uses AJAX (it implements IPostBackDataHandler and ICallbackEventHandler). I have tested it, and it seems to work the way I want. However, when I used it in...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.