Problem
I have an ASPX file, with a table of 3 columns, 2 rows with a usercontrol in
the middle column (in the code snippet stated below, although in reality,
the left hand column would also have a user control).
I have a "footer" on the second/bottom row. However, when the User Control
in the middle column, first row is generating a lot of text, the text is
"squashing" the text in the second role!
Don't believe me? Try it!
Using ASP.NET 1.1 on Windows XP Professional SP1 IIS5.1
Problem also replicable on ASP.NET 1.1 on Windows 2000 Server SP4 IIS5.0
---Start of WebForm1.aspx---
<%@ Register TagPrefix="uc1" TagName="Search Results"
Src="UserContro lDemo.ascx" %>
<%@ Page language="c#" Codebehind="Web Form1.aspx.cs" AutoEventWireup ="false"
Inherits="HTMLP roblem.WebForm1 " %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<link href="/Website/Styles/styles.css" type="text/css"
rel="stylesheet ">
<meta content="Micros oft Visual Studio 7.0" name="GENERATOR ">
<meta content="C#" name="CODE_LANG UAGE">
<meta content="JavaSc ript" name="vs_defaul tClientScript">
<meta content="http://schemas.microso ft.com/intellisense/ie5"
name="vs_target Schema">
<META http-equiv="Expires" content="0">
<META http-equiv="Pragma" content="no-cache">
<META http-equiv="Cache-Control" content="no-cache">
</HEAD>
<body>
<form id="SubPage" method="post" runat="server">
<table id="Table1" height="100%" cellSpacing="0" cellPadding="0"
width="100%" border="0">
<tr>
<TD vAlign="top" align="left" width="135"
bgColor="#00000 0">
<!-- Start Left Navigation -->
<table cellSpacing="0" cellPadding="0" width="100%"
border="0">
<%for (int j=0;j<15;j++)
{%>
<tr>
<td
class='NavSubCh annelMainCell'> nav<%=j%></td>
</tr>
<%}%>
</table>
</TD>
<!-- End Left Navigation -->
<td vAlign="top" align="center" width="605"
style="WIDTH: 605px">
<TABLE id="Table2" height="100%" cellSpacing="0"
cellPadding="0" width="585" border="0">
<TR>
</TR>
<tr>
<td vAlign="top" align="center" width="555"
bgColor="#fffff f" height="1"><img alt="Breadcrumb trail"
src="/website/images/home/bread_crumb_dot s.gif" border="0"></td>
</tr>
<TR>
</TR>
<TR>
<TD vAlign="top" align="left" width="565"
bgColor="#fffff f" height="100%">
<P>
<span class="bodytext ">
<uc1:SearchResu lts
id="SearchResul ts1" runat="server"> </uc1:SearchResul ts></span></P>
</TD>
</TR>
</TABLE>
</td>
<td vAlign='bottom' align='left' bgColor='#e7180 8'
style='HEIGHT: 495px'>
<IMG alt='Youth Justice Board Sub Page Text Bar'
src='/website/images/home/home_bar_text.g if'
border='0'>
</td>
</tr>
<!--<tr>
<td background="/website/images/home/footer_dots.gif "
colSpan="3" height="2"></td>
</tr>-->
<tr>
<td colSpan="3" height="15">
Footer Footer Footer</td>
</tr>
</table>
</form>
</body>
</HTML>
---End of WebForm1.aspx---
WebForm1.aspx.c s- leave as default
---start of UserControlDemo .ascx---
<%@ Control Language="c#" AutoEventWireup ="false"
Codebehind="Use rControlDemo.as cx.cs" Inherits="HTMLP roblem.UserCont rolDemo"
TargetSchema="h ttp://schemas.microso ft.com/intellisense/ie5"%>
<P>
<asp:label id="SearchResul tsArea" CssClass="Searc hResultsClass"
Visible="True" runat="server" Width="550px"></asp:label>
</p>
---end of UserControlDemo .ascx---
--Start of USerControlDemo .ascx.cs---
namespace HTMLProblem
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.W ebControls;
using System.Web.UI.H tmlControls;
/// <summary>
/// Summary description for UserControlDemo .
/// </summary>
public class UserControlDemo : System.Web.UI.U serControl
{
//protected System.Web.UI.W ebControls.Imag eButton SearchNext;
//protected System.Web.UI.W ebControls.Imag eButton SearchPrev;
protected System.Web.UI.W ebControls.Labe l SearchResultsAr ea;
private void Page_Load(objec t sender, System.EventArg s e)
{
// Put user code to initialize the page here
DoSearch();
}
#region Web Form Designer generated code
override protected void OnInit(EventArg s e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeCompo nent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeCompo nent()
{
this.Load += new System.EventHan dler(this.Page_ Load);
}
#endregion
private void DoSearch()
{
for (int i=0;i<100;i++)
{
SearchResultsAr ea.Text = SearchResultsAr ea.Text + "results
results results results results results <br>results results results results
results results results results results results results results results ";
}
}
}
}
--End of USerControlDemo .ascx.cs---