Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

PRB: Properties Window Displays First Paragraph Tag Property When You Modify an ASP.NET Control Property


View products that this article applies to.

Symptoms

When you change the property of a control in an ASP.NET application by using the list in the Properties window in Microsoft Visual Studio .NET, the Properties window automatically changes to display the property of the first paragraph tag (<P>) on the Web page. The problem occurs only one time, and it occurs when you switch from HTML view to Design view. The problem does not occur on later changes in the property.

↑ Back to the top


Resolution

You can use one of the following methods to resolve the problem:
Instead of selecting the property value from the list, click the property, and then press the DOWN ARROW key to move to the next value of the property.
If possible, remove the paragraph tags. If you cannot remove the paragraph tags, make sure that the first pair do not enclose a control. Instead, make sure the first pair is are grouped together (<P></P>).
Select the ASP.NET server control again, and then modify the property again.

↑ Back to the top


Status

This behavior is by design.

↑ Back to the top


More information

Steps to Reproduce the Behavior

1.In Microsoft Visual Studio .NET, create a new ASP.NET Web Application Project by using Visual Basic .NET or Visual C# .NET. By default, WebForm1.aspx is created.
2.Right-click the WebForm1.aspx page, and then click Properties.
3.Under Page Layout, select FlowLayout, and then click OK.
4.Drag a Label control from the Toolbox to WebForm1.aspx.
5.Right-click WebForm1.aspx, and then click View HTML Source.
6.Add paragraph tags around the control as follows:
<P><asp:Label id="Label1" runat="server">Label</asp:Label></P>
7.In the Toolbox, click the Data tab, and then add an object such as a SqlDataAdapter object. By default, SqlDataAdapter1 is created.
8.Switch from Design view of WebForm1.aspx to HTML view, and then switch back to Design view.
9.Select and right-click SqlDataAdapter1, and then click Properties.
10.Edit any of the properties that have a combo box, and then select any property. For example, select MissingMappingAction, expand the list, and then select Passthrough.

↑ Back to the top


References

For more information about ASP.NET server controls, visit the following Microsoft Developer Network (MSDN) Web site:

↑ Back to the top


Keywords: KB817031, kbcontrol, kbctrl, kbprb, kbdesigner, kbwebforms

↑ Back to the top

Article Info
Article ID : 817031
Revision : 4
Created on : 5/12/2003
Published on : 5/12/2003
Exists online : False
Views : 386