468,106 Members | 1,442 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,106 developers. It's quick & easy.

Error w/user control "could not reformat..."

I created a simple user control and placed it on another page. Often I get
this error:

"Could not reformat the document due to line 27. The original format was
restored."

Line 27 in the HTML is this:
<uc1:_Header id=_Header1 runat="server"></uc1:_Header></TD></TR>

Any ideas?

Thanks.
Nov 18 '05 #1
2 3402
Are you allowed to have 2 user ctrls with the same tagprefix? By default it
made them both "uc1".

Here's the HTML:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="QCData.aspx.vb"
Inherits="DMSI.QCData"%>
<%@ Register TagPrefix="uc1" TagName="_Header" Src="_Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="_Navigation" Src="_Navigation.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>QCData</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<P align="center">
<TABLE id="Table1" style="WIDTH: 779px; HEIGHT: 768px" cellSpacing="0"
cellPadding="0"
width="779" border="0">
<TR>
<TD vAlign="top" align="center" colSpan="1" rowSpan="2">
<TABLE id="Table2" style="WIDTH: 779px; HEIGHT: 752px"
cellSpacing="0" cellPadding="0"
width="779" border="0">
</TABLE>
<TABLE id="Table3" style="WIDTH: 779px; HEIGHT: 768px"
cellSpacing="0" cellPadding="0"
width="779" border="0">
<TR>
<TD style="HEIGHT: 4px">
<uc1:_Header id=_Header1 runat="server"></uc1:_Header></TD>
</TR>
<TR>
<TD style="HEIGHT: 149px" vAlign="top" align="center">
<TABLE id="Table4" style="WIDTH: 779px; HEIGHT: 702px"
cellSpacing="0" cellPadding="0"
width="779" border="0">
<TR>
<TD style="WIDTH: 52px" vAlign="top" align="left">
<uc1:_Navigation id=_Navigation1 runat="server"></uc1:_Navigation></TD>
<TD></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</P>
</form>
</body>
</HTML>

"VB Programmer" <Do*****************@jEmail.com> wrote in message
news:u0**************@TK2MSFTNGP09.phx.gbl...
I created a simple user control and placed it on another page. Often I get this error:

"Could not reformat the document due to line 27. The original format was
restored."

Line 27 in the HTML is this:
<uc1:_Header id=_Header1 runat="server"></uc1:_Header></TD></TR>

Any ideas?

Thanks.

Nov 18 '05 #2
Figured it out. It was the underscore in the name.

"VB Programmer" <Do*****************@jEmail.com> wrote in message
news:eG*************@TK2MSFTNGP09.phx.gbl...
Are you allowed to have 2 user ctrls with the same tagprefix? By default it made them both "uc1".

Here's the HTML:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="QCData.aspx.vb"
Inherits="DMSI.QCData"%>
<%@ Register TagPrefix="uc1" TagName="_Header" Src="_Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="_Navigation" Src="_Navigation.ascx" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>QCData</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<P align="center">
<TABLE id="Table1" style="WIDTH: 779px; HEIGHT: 768px" cellSpacing="0"
cellPadding="0"
width="779" border="0">
<TR>
<TD vAlign="top" align="center" colSpan="1" rowSpan="2">
<TABLE id="Table2" style="WIDTH: 779px; HEIGHT: 752px"
cellSpacing="0" cellPadding="0"
width="779" border="0">
</TABLE>
<TABLE id="Table3" style="WIDTH: 779px; HEIGHT: 768px"
cellSpacing="0" cellPadding="0"
width="779" border="0">
<TR>
<TD style="HEIGHT: 4px">
<uc1:_Header id=_Header1 runat="server"></uc1:_Header></TD>
</TR>
<TR>
<TD style="HEIGHT: 149px" vAlign="top" align="center">
<TABLE id="Table4" style="WIDTH: 779px; HEIGHT: 702px"
cellSpacing="0" cellPadding="0"
width="779" border="0">
<TR>
<TD style="WIDTH: 52px" vAlign="top" align="left">
<uc1:_Navigation id=_Navigation1 runat="server"></uc1:_Navigation></TD>
<TD></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</P>
</form>
</body>
</HTML>

"VB Programmer" <Do*****************@jEmail.com> wrote in message
news:u0**************@TK2MSFTNGP09.phx.gbl...
I created a simple user control and placed it on another page. Often I

get
this error:

"Could not reformat the document due to line 27. The original format was restored."

Line 27 in the HTML is this:
<uc1:_Header id=_Header1 runat="server"></uc1:_Header></TD></TR>

Any ideas?

Thanks.


Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Christopher Parent | last post: by
reply views Thread by =?Utf-8?B?eHl6X2phdA==?= | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.