Well, this is easy enough to reproduce: I can now do it at will. It's also worse than I thought as it's not just changing the formatting.
Start with this:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Menu.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<link rel="Stylesheet" type="text/css" href="css/main.css" />
</head>
<body>
<form id="form1" runat="server">
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></cc1:ToolkitScriptManager>
<asp:Panel ID="Panel1" runat="server" CssClass="MenuPanel" HorizontalAlign="Center">
<cc1:Accordion ID="ACC1" runat="server"
SelectedIndex="0" AutoSize="Limit"
ContentCssClass="accordionContent"
CssClass="accordionMain" EnableTheming="False"
FramesPerSecond="60" HeaderCssClass="accordionHeader"
HeaderSelectedCssClass="accordionHeaderSel">
<Panes>
<cc1:AccordionPane ID="AccordionPane1" runat="server" ContentCssClass="" HeaderCssClass="">
<header>I am Header One</header>
<content>I am Content One</content>
</cc1:AccordionPane>
<cc1:AccordionPane ID="AccordionPane2" runat="server" ContentCssClass="" HeaderCssClass="">
<Header>I am Header Two</Header>
<Content>I am Content Two</Content>
</cc1:AccordionPane>
<cc1:AccordionPane ID="AccordionPane3" runat="server" ContentCssClass="" HeaderCssClass="">
<Header>I am Header Two</Header>
<Content>I am Content Two</Content>
</cc1:AccordionPane>
</Panes>
</cc1:Accordion>
</asp:Panel>
<cc1:RoundedCornersExtender ID="Panel1_RoundedCornersExtender" runat="server"
Enabled="True" TargetControlID="Panel1">
</cc1:RoundedCornersExtender>
</form>
</body>
</html>
Then in the Design view, select the Accordion and change the CssClass property in the Properties window. Go back to Source view and I see this:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Menu.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Untitled Page</title>
<link rel="Stylesheet" type="text/css" href="css/main.css" />
</head>
<body>
<form id="form1" runat="server">
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</cc1:ToolkitScriptManager>
<asp:Panel ID="Panel1" runat="server" CssClass="MenuPanel" HorizontalAlign="Center">
<cc1:Accordion ID="ACC1" runat="server" SelectedIndex="0" AutoSize="Limit" ContentCssClass="accordionContent"
CssClass="MenuPanel" EnableTheming="False" FramesPerSecond="60" HeaderCssClass="accordionHeader"
HeaderSelectedCssClass="accordionHeaderSel">
<Panes>
<cc1:AccordionPane ID="AccordionPane1" runat="server" ContentCssClass="" HeaderCssClass="">
<Header>I am Header One</Header>
<Content>I am Content One</Content>
</cc1:AccordionPane>
<cc1:AccordionPane ID="AccordionPane2" runat="server" ContentCssClass="" HeaderCssClass="">
<Header>I am Header Two</Header>
<Content>I am Content Two</Content>
</cc1:AccordionPane>
<cc1:AccordionPane ID="AccordionPane3" runat="server" ContentCssClass="" HeaderCssClass="">
<Header>I am Header Two</Header>
<Content>I am Content Two</Content>
</cc1:AccordionPane>
</Panes>
<cc1:AccordionExtender ID="ACC1_AccordionExtender" runat="server"
AutoSize="Limit" ContentCssClass="accordionContent" Enabled="True"
FramesPerSecond="60" HeaderCssClass="accordionHeader"
HeaderSelectedCssClass="accordionHeaderSel" TargetControlID="ACC1"></cc1:AccordionExtender>
<cc1:AccordionPane ID="AccordionPane1" runat="server" ContentCssClass=""
HeaderCssClass=""><header>
I am Header One
</header>
<content>
I am Content One
</content>
</cc1:AccordionPane>
<cc1:AccordionPane ID="AccordionPane2" runat="server" ContentCssClass=""
HeaderCssClass=""><header>
I am Header Two
</header>
<content>
I am Content Two
</content>
</cc1:AccordionPane>
<cc1:AccordionPane ID="AccordionPane3" runat="server" ContentCssClass=""
HeaderCssClass=""><header>
I am Header Two
</header>
<content>
I am Content Two
</content>
</cc1:AccordionPane>
</cc1:Accordion>
</asp:Panel>
<cc1:RoundedCornersExtender ID="Panel1_RoundedCornersExtender" runat="server" Enabled="True"
TargetControlID="Panel1">
</cc1:RoundedCornersExtender>
</form>
</body>
</html>
I can do this every time. Now, let's break down what it's doing here:
1) You can see it inserted a new block for <cc1:AccordionExtender>. What this is supposed to be, I don't know, but it appears to duplicate a lot of the properties of the Accordion itself. Whatever it is, Visual Studio doesn't like it and doesn't recognize it as a valid tag.
2) You can see it duplicated the Pane definitions.
Quite a mess. It looks to me like it's confused about how to write the changed Accordion entity back to the html file after updating the property.