Monday, March 26, 2012

Panel generating too many <p></p>s

Hi when i load my asp page and work with the panel control and the reapter control I will get <p> breaks added to my html. After a while there is a long long list of <p> breaks that keeps on growing. Is there a way around this.

Here is the code
<html>
<head>
</head>
<body vlink="#55331c" link="#55331c">
<form action="notes.aspx" method="post" runat="server">
<p>
</p>
<p>
<table cellpadding="8" border="0">
<tbody>
<tr bgcolor="#bfbcbc">
<td>
<asp:DropDownList id="DropDownList1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"></asp:DropDownList>
</td>
<td>
<asp:DropDownList id="DropDownList2" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DropDownList2_SelectedIndexChanged"></asp:DropDownList>
<asp:Label id="Label10" runat="server"></asp:Label></td>
<td>
<asp:DropDownList id="DropDownList3" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DropDownList3_SelectedIndexChanged"></asp:DropDownList>
<asp:Label id="Label9" runat="server"></asp:Label><font size="5"><font face="Arial"></font></font></td>
</tr>
</tbody>
</table>
<asp:Label id="Label11" font-names="Arial" forecolor="#FF8000" runat="server">Sun
Search Results for Part: </asp:Label><asp:Label id="Label7" font-names="Arial" forecolor="#FF8000" runat="server">Label</asp:Label>
</p>
<p align="left">
<table style="WIDTH: 704px; HEIGHT: 67px" height="67" width="704" name="Table1">
<tbody>
<tr>
<td width="50%">
<asp:Label id="Label12" font-names="Arial" forecolor="#FF8000" runat="server">Part: </asp:Label><asp:Label id="Label4" font-names="Arial" runat="server"></asp:Label>
</td>
<td rowspan="2">

<asp:HyperLink id="HyperLink1" runat="server" Font-Names="Arial">[Click here to View Image]</asp:HyperLink>
</td>
</tr>
<tr>
<td>
<asp:Label id="Label13" font-names="Arial" forecolor="#FF8000" runat="server">Work
Center: </asp:Label><asp:Label id="Label5" font-names="Arial" runat="server"></asp:Label> <asp:Label id="Label6" font-names="Arial" runat="server"> </asp:Label></td>
</tr>
</tbody>
</table>
</p>
<p align="left">
<asp:Panel id="Panel1" runat="server" Height="260px" Width="291px" BackColor="#E9E8E8">
<p></p>
<p></p>
<p>
<asp:Label id="Label3" font-names="Arial" runat="server" text="Operator">Operator:</asp:Label>
<asp:TextBox id="TextBox3" runat="server"></asp:TextBox>
</p>
<p>
<asp:Label id="Label8" font-names="Arial" runat="server" text="Comment">Comment:</asp:Label>
</p>
<p align="center">
<asp:TextBox id="TextBox2" runat="server" Height="96px" Width="256px" TextMode="MultiLine"></asp:TextBox>
</p>
<p></p>
<p align="right">
<asp:Button id="Button4" onclick="Button4_Click" runat="server" Font-Names="Arial" Width="111px" Text="Submit Comment"></asp:Button>
</p>
<p align="left"></p>
</asp:Panel>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
<asp:Button id="Button2" onclick="Button2_Click" runat="server" Font-Names="Arial" Width="109px" Text="Add Comment"></asp:Button>

<asp:Button id="Button3" onclick="Button3_Click" runat="server" Font-Names="Arial" Width="107px" Text="Close"></asp:Button>

</p>
<p>
<asp:Button id="Button1" onclick="Button1_Click" runat="server" Font-Names="Arial" Text="Refresh List"></asp:Button>
</p>
<p>
<asp:Repeater id="notes" runat="server">
<HeaderTemplate>
<table border="0" width="75%">
<tr>
<th width="10%">
<font face="arial">User ID</font>
</th>
<th>
<font face="arial">Comments</font>
</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td width="10%">
<font face="arial"> <%# Container.DataItem("userID") %></font></td>
<td width="60%">
<font face="arial"> <%# Container.DataItem("noteField") %></font></td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr bgcolor="#c0c0c0">
<td width="10%">
<font face="arial"> <%# Container.DataItem("userID") %></font></td>
<td width="60%">
<font face="arial"> <%# Container.DataItem("noteField") %></font></td>
</tr>
</AlternatingItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
</form>
<p>
</p>
</body>Welcome to the ASP.NET forums, sunMatrix.

It looks like, when you're designing your pages, you're pressing the Enter key in order to "bump" things down on the page. Is that what you're doing?
nope i figuered it out. it was the auto dhtml generation in web-matrix that was doing this. I disabled that feature and that fixed the problem

0 comments:

Post a Comment