473,653 Members | 3,000 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Malformed HTML from UserControl

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---
Nov 18 '05 #1
1 1520
Problem resolved!
This was caused by the use of absolute position in CSS Style sheet and not
ASP.NET
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
4310
by: KC | last post by:
I have written a parser using htmllib.HTMLParser and it functions fine unless the HTML is malformed. For example, is some instances, the provider of the HTML leaves out the <TR> tags but includes the </TR> tags. Apparently, htmllib and more likely sgmllib do not parse an end tag if a corresponding start tag was not found. Does anyone know a way to "fool" the parser into handling the end tag is a start tag was not found? Thanks,
3
3170
by: Dave McCracken | last post by:
I am hosting .Net UserControls in HTML pages with Object Tags. These UserControls are clients of remotable objects that run on the same machine. The remote objects execute callbacks via sponsor objects. The UserControl client creates and passes these sponsor objects to the remote objects. I am able to launch .Net UserControls and their dependent .Net components in HTML pages using the Object tag. I had to do the following to get it to...
3
1619
by: Gérard Talbot | last post by:
About a month ago, I've reported a crash bug at a wiki webpage where developers of MSIE 7 can read feedback from developers. The strange thing is that a particular malformed webpage can crash MSIE 6 SV1 (on XP Pro SP2) with all the updates, patches, security patches, etc.. even/despite the latest August 2005. It's been now more than 1 month that I reported that crash and nothing happened. Here's my question: Do you crash like I do while...
4
1563
by: ATS | last post by:
BUG/PRODUCTION-DOWN: UserControl running from HTML not working. Someone please help, I have a production down situation. For whatever reason, UserControls are not owkring from HTML/IE. When script tries to run a UserControl's method or use a property, IE gives an error "Object doesn't support this property or method". Example:
6
2714
by: sviau | last post by:
http://www.mls.ca/PropertyDetails.aspx?vd=&SearchURL=%3fMode%3d0%26Page%3d1%26vs%3d1%26rlt%3d%26cp%3d%26pt%3d1%26mp%3d0-0-0%26mrt%3d-1-0-0%26Beds%3d0-0% 26Baths%3d0-0%26f%3d%26ft%3dall%26o%3dA%26of%3d1%26ps%3d10%26aid%3d3490%26Ma pURL%3d%253fAreaID%253d3476&PropertyID=2127525
5
3584
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact that for server control component , code is running on the server side. But if I take as example a Label. I place on a webform an HTM label control and a WebForm label control, I could see that properties are different for
1
24131
by: Shalako | last post by:
I check my error log and see these entries: malformed header from script. Bad header= Missing gauge reports are ind: padata.pl /perl/pema/padata.pl did not send an HTTP header malformed header from script. Bad header= : padata.pl /perl/pema/padata.pl did not send an HTTP header malformed header from script. Bad header= Missing gauge reports are ind: padata.pl /perl/pema/padata.pl did not send an HTTP header malformed...
4
4934
by: Jens | last post by:
Hello, We have several cases where an email, send with the CDO.Message object in ASP, is received malformed at the receiver's e-mail address. code in it. When the message is received at the client's email address there are some characters or text mallformed, each time at another position in the e-mail. I know for sure that the html code is valid so that's not the problem.
1
1842
by: Aaron Gray | last post by:
I am looking for an HTML parser that will parser malformed HTML Netscape bookmarks.html files. Ideally it will work with callbacks. Many thanks in advance, Aaron
0
8370
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8283
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8811
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8470
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7302
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5620
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4291
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2707
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1914
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.