[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


           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

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"

<html xmlns="http://www.w3.org/1999/xhtml">
<body class="template">
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

---- 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

---- web.config ----

                <compilation debug="true">
                                <add assembly="System.Web.DynamicData,
Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                                <add tagPrefix="asp"
namespace="System.Web.DynamicData" assembly="System.Web.DynamicData,
Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

---- foo.aspx ----

<%@ Page Language="C#" MasterPageFile="~/Site.master"
Inherits="System.Web.UI.Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
<%= PageAction.Edit %>
<%= PageAction.EditXXX %>

---- bar.aspx ----

<%@ Page Language="C#" Inherits="System.Web.UI.Page" %>

<%= PageAction.Edit %>

---- baz.aspx ----
<%@ Page Language="C#" Inherits="System.Web.UI.Page" %>

<%= System.Web.DynamicData.PageAction.Edit %>


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