[Mono-bugs] [Bug 438132] New: insufficient namespace imports in masterpages.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Oct 23 06:12:11 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=438132
Summary: insufficient namespace imports in masterpages.
Product: Mono: Class Libraries
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Web
AssignedTo: mhabersack at novell.com
ReportedBy: atsushi at ximian.com
QAContact: mono-bugs at lists.ximian.com
Found By: Development
I found that under a master page an aspx page in Microsoft ASP.NET imports the
namespaces defined in pages/controls elements. It is not done under Mono
ASP.NET.
The following set of files reproduces the issue:
---- Site.master ----
<%@ Master Language="C#" CodeBehind="Site.master.cs"
Inherits="DynamicData1.Site" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body class="template">
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</body>
</html>
---- Site.master.cs ----
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace DynamicData1
{
public partial class Site : System.Web.UI.MasterPage
{
protected System.Web.UI.WebControls.ContentPlaceHolder
ContentPlaceHolder1;
}
}
---- web.config ----
<configuration>
<system.web>
<compilation debug="true">
<assemblies>
<add assembly="System.Web.DynamicData,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
<pages>
<controls>
<add tagPrefix="asp"
namespace="System.Web.DynamicData" assembly="System.Web.DynamicData,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
</system.web>
</configuration>
---- foo.aspx ----
<%@ Page Language="C#" MasterPageFile="~/Site.master"
Inherits="System.Web.UI.Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<%= PageAction.Edit %>
<%= PageAction.EditXXX %>
</asp:Content>
---- bar.aspx ----
<%@ Page Language="C#" Inherits="System.Web.UI.Page" %>
<html>
<body>
<%= PageAction.Edit %>
</body>
</html>
---- baz.aspx ----
<%@ Page Language="C#" Inherits="System.Web.UI.Page" %>
<html>
<body>
<%= System.Web.DynamicData.PageAction.Edit %>
</body>
</html>
--------
How to reproduce:
- Create all those files above under a directory.
- mkdir bin
- gmcs -t:library -pkg:dotnet35 Site.master.cs -out:bin/DynamicData1.dll
On Windows, run IIS manager and create a virtual web directory for it to verify
what happens under ASP.NET.
On Mono, run xsp2
Expected results:
- .NET foo.aspx -> error at <%= PageAction.EditXXX %> which means, <%=
PageAction.Edit %> passes.
- .NET bar.aspx -> error at <%= PageAction.Edit %>
- Mono -> both error at <%= PageAction.Edit %>
- baz.aspx -> works on both .NET and Mono.
Additional notes:
This means, master-page-based foo.aspx should allow reference to "PageAction"
without fully qualified namespace (that is what baz.aspx does and works).
Since baz.aspx works, it is not about assembly reference but about namespace
reference. And since bar.aspx fails on .NET, it is only about master pages.
It blocks DynamicData aspx pages that Visual Studio automatically generates for
DynamicData projects.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list