[Mono-bugs] [Bug 77326][Nor] New - unsing <thead>:Cannot add a System.Web.UI.HtmlControls.HtmlGenericControl to System.Web.UI.HtmlControls.HtmlTableRow

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Jan 23 09:32:58 EST 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by karnhoffer at ecron.hu.

http://bugzilla.ximian.com/show_bug.cgi?id=77326

--- shadow/77326	2006-01-23 09:32:58.000000000 -0500
+++ shadow/77326.tmp.21573	2006-01-23 09:32:58.000000000 -0500
@@ -0,0 +1,229 @@
+Bug#: 77326
+Product: Mono: Class Libraries
+Version: 1.1
+OS: SUSE 9.2
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Web
+AssignedTo: gonzalo at ximian.com                            
+ReportedBy: karnhoffer at ecron.hu               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: unsing <thead>:Cannot add a System.Web.UI.HtmlControls.HtmlGenericControl to System.Web.UI.HtmlControls.HtmlTableRow
+
+Please fill in this template when reporting a bug, unless you know what you 
+are doing.
+Description of Problem:
+I try to run a simple ASP page from a Mono server. There is a System.Web.
+UI.HtmlControls.HtmlTable control on the page. The problem is that I use 
+<thead> tags. I get the following compilation error:
+
+Server Error in '/c' Application
+
+---------------------------------------------------------------------------
+-----
+
+Parser Error
+Description: Error parsing a resource required to service this request. 
+Review your source file and modify it to fix this error. 
+Error message: Cannot add a System.Web.UI.HtmlControls.HtmlGenericControl 
+to System.Web.UI.HtmlControls.HtmlTableRow 
+
+File name: /home/karnhoffer/public_html/mod_mono_c_test/WebForm1.aspx    
+Line: 14 
+
+Source Error: 	<body>
+		<form id="Form1" method="post" runat="server">
+			<TABLE id="Table1" cellSpacing="1" cellPadding="1" 
+width="300" border="1" runat="server">
+				<thead>
+					<TR>
+						<TD></TD>
+						<TD></TD>
+
+ 
+When I delete <thead>s, it compiles fine.
+
+I found a very similar bug in the Bugzilla under #52157. The problem there 
+seems to be the same with the <tbody> tag. <tbody> does not cause this 
+problem.
+
+Steps to reproduce the problem:
+1. 
+Sample aspx file:
+
+<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" 
+AutoEventWireup="false" Inherits="MonoCharsetTest.WebForm1" %>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
+<HTML>
+	<HEAD>
+		<title>WebForm1</title>
+		<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
+		<meta name="CODE_LANGUAGE" Content="C#">
+		<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">
+			<TABLE id="Table1" cellSpacing="1" cellPadding="1" 
+width="300" border="1" runat="server">
+				<thead>
+					<TR>
+						<TD></TD>
+						<TD></TD>
+						<TD></TD>
+					</TR>
+				</thead>
+			      <tbody>
+					<TR>
+						<TD></TD>
+						<TD></TD>
+						<TD></TD>
+					</TR>
+				</tbody>
+			</TABLE>
+		</form>
+	</body>
+</HTML>
+
+Sample aspx.cs file (nothing special):
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Web;
+using System.Web.SessionState;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.HtmlControls;
+
+namespace MonoCharsetTest
+{
+	/// <summary>
+	/// Summary description for WebForm1.
+	/// </summary>
+	public class WebForm1 : System.Web.UI.Page
+	{
+		protected System.Web.UI.HtmlControls.HtmlTable Table1;
+		protected System.Web.UI.HtmlControls.HtmlInputButton Button1;
+
+		private void Page_Load(object sender, System.EventArgs e)
+		{
+			// Put user code to initialize the page here
+		}
+
+		#region Web Form Designer generated code
+		override protected void OnInit(EventArgs e)
+		{
+			//
+			// CODEGEN: This call is required by the ASP.NET Web Form 
+designer.
+			//
+			InitializeComponent();
+			base.OnInit(e);
+		}
+
+		/// <summary>
+		/// Required method for Designer support - do not modify
+		/// the contents of this method with the code editor.
+		/// </summary>
+		private void InitializeComponent()
+		{    
+			this.Load += new System.EventHandler(this.Page_Load);
+		}
+		#endregion
+
+		private void Button1_ServerClick(object sender, System.
+EventArgs e)
+		{
+			Response.SuppressContent = true;
+		}
+	}
+}
+
+
+2. 
+
+Run the aspx page on the webserver!
+
+3. 
+
+Actual Results:
+Compilation fails saying:
+
+Server Error in '/c' Application
+
+---------------------------------------------------------------------------
+-----
+
+Parser Error
+Description: Error parsing a resource required to service this request. 
+Review your source file and modify it to fix this error. 
+Error message: Cannot add a System.Web.UI.HtmlControls.HtmlGenericControl 
+to System.Web.UI.HtmlControls.HtmlTableRow 
+
+File name: /home/karnhoffer/public_html/mod_mono_c_test/WebForm1.aspx    
+Line: 27 
+
+Source Error: 			<TABLE id="Table1" cellSpacing="1" 
+cellPadding="1" width="300" border="1" runat="server">
+
+<thead>
+					<TR>
+
+						<TD></TD>
+
+ 
+
+
+
+Expected Results:
+Page like this (no compiler error):
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
+<HTML>
+	<HEAD>
+		<title>WebForm1</title>
+		<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
+		<meta name="CODE_LANGUAGE" Content="C#">
+		<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">
+			<TABLE id="Table1" cellSpacing="1" cellPadding="1" 
+width="300" border="1" runat="server">
+				<thead>
+					<TR>
+						<TD></TD>
+						<TD></TD>
+						<TD></TD>
+					</TR>
+				</thead>
+			      <tbody>
+					<TR>
+						<TD></TD>
+						<TD></TD>
+						<TD></TD>
+					</TR>
+				</tbody>
+			</TABLE>
+		</form>
+	</body>
+</HTML>
+
+How often does this happen? 
+Allways
+
+Additional Information:
+I compiled the assemblies with VisualStudion on Windows XP and run the 
+webapp on a SuSE Linux 9.2 machine with Mono 1.1.13.


More information about the mono-bugs mailing list