I have user controls disappearing from VS 2008 Windows Form designer
HTML markup remains in .ascx file, and identical to HTML markup appearing in aspx file elsewhere in the project.
Steps are
Add Scriptmanager and update panel controls
Drag panel and labels into update panel
Attach style sheet via View/Manage Styles
Assign style sheet to control propertys
<change is reflected in designer view>
All seems fine,
however, after editing Source (adding line breaks, editing control ID etc.
the IDE appears to arbitrarily "lose track" of markup and all controls disappear from design screen - never to be seen again.
As simple as it can be...
<%
@ Control Language="C#" AutoEventWireup="true" CodeFile="dcPanelControl.ascx.cs" Inherits="WebUserControl" %>
<
link href="StyleSheet.css" rel="stylesheet" type="text/css" />
<
asp:ScriptManager ID="ScriptManager1" runat="server">
</
asp:ScriptManager>
<
asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<br />
<asp:Panel ID="pnlMain" runat="server" CssClass="PanelBox">
<asp:Label ID="lblHeader" runat="server" CssClass="LabelHeading" Text="Label"></asp:Label>
<asp:Label ID="lblContent" runat="server" CssClass="LabelContent" Text="Label"></asp:Label>
</asp:Panel>
<br />
<br />
<br />
<asp:Button ID="btnAction" runat="server" Text="Button" />
</ContentTemplate>
</
asp:UpdatePanel>
Thanks!