Microsoft KB Archive/815048

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

Article ID: 815048

Article Last Modified on 10/18/2005

-

APPLIES TO


 * Microsoft Visual Studio .NET 2002 Professional Edition
 * Microsoft Visual Studio .NET 2002 Enterprise Architect
 * Microsoft Visual Studio .NET 2002 Enterprise Developer

-



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:

http://support.microsoft.com/contactus/?ws=support

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
 In Visual Studio .NET, create a new Web Application. By default, Webform1 is created. Switch to Design view of Webform1. Drag a Label control from the Toolbox to Webform1, click the control, and then press F4 to view the Properties for the control. 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. Set the Bold property of the font to True. Notice that the Label control appears as bold text in Design view. Compile and then run the Web page. Notice that the label appears as bold text. Quit the browser. In Visual Studio .NET, click the Label control.</li> 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.</li> Switch to HTML view, and then switch to Design view again. Notice that the text in Design view is no longer bold.</li> Compile and then run the Web page again. Notice that the label appears as bold text.</li> Quit the browser. In Visual Studio .NET, switch to HTML view.</li>  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=&quot;Label1&quot; style=&quot;Z-INDEX: 102; LEFT: 204px; POSITION: absolute; TOP: 63px&quot; runat=&quot;server&quot; Width=&quot;146px&quot; Font-Bold=&quot;True&quot;>Label</asp:Label> </li></ol>

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.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

Keywords: kbbug kbfix kbqfe kbautotext kbhtml kbeditctrl kbdhtml kbvs2002sp1sweep kbhotfixserver KB815048

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.