Rick Strahl recently posted about some his frustrations with the Visual Studio 2008 Designer - HTML Mangling with Literal Controls in the <head>. While I've not had Visual Studio mangle my pages' markup when switching between the Design and Source views like Rich has, I have had one especially nagging issue since Visual Studio 2005: when I'm in the Designer and I select a control on the page very often the properties for the selected control are not loaded in the Properties window. This problem has been particularly accute in Visual Studio 2008. Does this happen to anyone else?
Here are things I resort to when this behavior starts:
- Say au revoir to the Designer and do your development from the Source view. This is fine if you are comfortable with HTML and Web control and data binding markup, but this option is less palatable if you are training or teaching a class or helping a coworker who is most familiar with the Designer.
- Try loading the properties by selecting another control on the page and then re-selecting the initial control whose properties I wanted to view. Sometimes this works.
- Right-click on the control and select Properties from the context menu. This technique worked 100% of the time in Visual Studio 2005 but rarely works for me in 2008.
- Selecting a control in the declarative markup seems to 'wake up' the Properties window. To load a control's properties, then, go to Split view, click up in the declarative markup to 'wake up' the Properties window and then select the control from the Designer.
This Designer behavior is especially frustrating when teaching a class. Each quarter I teach a class that introduces ASP.NET to students and it's a triffle embarassing to be standing at the front of the class showing them how to perform a certain task and fighting with Visual Studio's Designer to get a control's properties loaded in the Properties window.
It could be worse, I guess. I have one client who uses Visual Studio 2005 and he cannot set controls' ID properties from the Designer. If he adds a TextBox Web control to the page from the Designer its properties load in the Properties window and the ID displays as TextBox1. Now, if he goes to the Properties window and types in, FirstName, for instance, the Properties window shows FirstName but once he clicks off that control and returns to it the ID value has reverted to TextBox1. The only way he can change a control's ID property is to go to the Source view and change it from the declarative markup.