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



The information in this article applies to:

  • Microsoft ASP.NET (included with the .NET Framework 1.1)
  • Microsoft ASP.NET (included with the .NET Framework) 1.0

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.

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.

STATUS

This behavior is by design.

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.

REFERENCES

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

Modification Type:MinorLast Reviewed:5/12/2003
Keywords:kbDesigner kbControl kbCtrl kbWebForms kbprb KB817031 kbAudDeveloper