<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Naming Guidelines and Visual Controls</title><link>http://weblogs.asp.net/pgreborio/archive/2005/12/19/433517.aspx</link><description>According to the .NET naming guidelines it is often suggested to adopt camel case for private properties/fields and pascal case for protected and public properties/fields. It is unclear how to name visual controls. Let consider a standard label which</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>re: Naming Guidelines and Visual Controls</title><link>http://weblogs.asp.net/pgreborio/archive/2005/12/19/433517.aspx#433614</link><pubDate>Tue, 20 Dec 2005 15:51:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:433614</guid><dc:creator>lexp</dc:creator><author>lexp</author><description>I personally use notation like&lt;br&gt;&lt;br&gt;MyFirstNameTextBox&lt;br&gt;&lt;br&gt;&amp;quot;My&amp;quot; prefix is used mainly for intellisense.&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=433614" width="1" height="1"&gt;</description></item><item><title>re: Naming Guidelines and Visual Controls</title><link>http://weblogs.asp.net/pgreborio/archive/2005/12/19/433517.aspx#433536</link><pubDate>Mon, 19 Dec 2005 19:24:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:433536</guid><dc:creator>Kent Sharkey</dc:creator><author>Kent Sharkey</author><description>I agree with Phil &amp;amp; Jeff to use a &amp;quot;Property-like&amp;quot; name for the controls - although I tend to use FirstNameCaption (Label) and FirstNameField (TextBox) for my visible controls. Member variables (that back properties) are _whatever and parameters are camelCased as per the guidelines.&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=433536" width="1" height="1"&gt;</description></item><item><title>re: Naming Guidelines and Visual Controls</title><link>http://weblogs.asp.net/pgreborio/archive/2005/12/19/433517.aspx#433527</link><pubDate>Mon, 19 Dec 2005 18:15:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:433527</guid><dc:creator>Robert McLaws</dc:creator><author>Robert McLaws</author><description>I use TextBox_FirstName for my controls. Keeps my code more readable, since we don't have to be SO concerned about the memory footprint. It also helps with Intellisense when you're coding.&lt;br&gt;&lt;br&gt;It doesn't play as nice as you'd like with the automatic event handler naming conventions, but it still works.&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=433527" width="1" height="1"&gt;</description></item><item><title>re: Naming Guidelines and Visual Controls</title><link>http://weblogs.asp.net/pgreborio/archive/2005/12/19/433517.aspx#433519</link><pubDate>Mon, 19 Dec 2005 17:06:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:433519</guid><dc:creator>Jeff Gonzalez</dc:creator><author>Jeff Gonzalez</author><description>I prefer the more Verbose style of naming:&lt;br&gt;&lt;br&gt;FirstNameTextBox&lt;br&gt;CustomerIdDropDownList&lt;br&gt;&lt;br&gt;After all, we have intellisense =)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=433519" width="1" height="1"&gt;</description></item><item><title>re: Naming Guidelines and Visual Controls</title><link>http://weblogs.asp.net/pgreborio/archive/2005/12/19/433517.aspx#433518</link><pubDate>Mon, 19 Dec 2005 16:58:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:433518</guid><dc:creator>Phil Scott</dc:creator><author>Phil Scott</author><description>I'd go with FirstNameLabel myself, and have since 2002.  I thought this was the guidelines they were pushing for visual controls. &lt;br&gt;&lt;br&gt;In fact, try creating a menu with the MenuStrip control in VS2005.  If you create a menu item with the caption of Test VS2005 will automatically name it TestToolStripMenuItem.&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=433518" width="1" height="1"&gt;</description></item></channel></rss>