FIX: Property reset does not work for enumerated values or when you select a group of controls (815048)



The information in this article applies to:

  • Microsoft Visual Studio .NET (2002), Professional Edition SP1
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition SP1
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition SP1

SYMPTOMS

When you design Web Form applications, the Visual Studio .NET IDE has a Reset function that you can use to reset a property value to its original value. However, this function fails for some server side Web Form controls that have nested enumerated values. (The most common of these properties is the Font property.)

RESOLUTION

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question. The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date        Version       Size       File name
   -------------------------------------------------------------
   03-19-2003  1.0.3705.414  1,152,000  System.Data.dll
   03-19-2003  1.0.3705.414  1,656,000  System.Design.dll
   03-19-2003  1.0.3705.414  1,948,000  System.Windows.Forms.dll

MORE INFORMATION

This hotfix also fixes the problem that occurs when you select multiple controls of the same type, and then click Reset. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

319203 BUG: Reset may not effectively clear set properties

Additionally, you can press DELETE to reset any property that has a value that can be typed in a text box, such as the Font-Size property.

Steps to Reproduce the Behavior

  1. In Visual Studio .NET, create a new Web Application. By default, Webform1 is created. Switch to Design view of Webform1.
  2. Drag a Label control from the Toolbox to Webform1, click the control, and then press F4 to view the Properties for the control.
  3. Notice that the Font property for this control has a plus sign (+) next to it. The plus sign indicates that this is a nested tree or an enumerated value. Expand the Font tree to view more Font properties for the Label control.
  4. Set the Bold property of the font to True. Notice that the Label control appears as bold text in Design view.
  5. Compile and then run the Web page. Notice that the label appears as bold text.
  6. Quit the browser. In Visual Studio .NET, click the Label control.
  7. In Properties, right-click the Bold property, and then click Reset. The Bold property value is now set to False. However, the text in Design view is still bold.
  8. Switch to HTML view, and then switch to Design view again. Notice that the text in Design view is no longer bold.
  9. Compile and then run the Web page again. Notice that the label appears as bold text.
  10. Quit the browser. In Visual Studio .NET, switch to HTML view.
  11. Locate the HTML definition for the Label control, and then view the style settings for that control. Notice that the Font-Bold property is set to True. The HTML definition appears similar to the following:
    <asp:Label id="Label1" style="Z-INDEX: 102; LEFT: 204px; POSITION: absolute; TOP: 63px" runat="server" 
    Width="146px" Font-Bold="True">Label</asp:Label>
The Font-Bold property should have been removed. However, it remains in the HTML code and has a value of True. This causes the label to appear in the browser as bold text, although, in Design view in Visual Studio .NET, the Label control does not appear as bold text and the Font- Bold property is set to False.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Modification Type:MinorLast Reviewed:10/18/2005
Keywords:kbHotfixServer kbQFE kbvs2002sp1sweep kbDHTML kbautotext kbhtml kbEditCtrl kbfix kbQFE kbBug KB815048