[Mono-list] XSP2: Wrong field names for controls when using master pages

Lluis Sanchez lluis@ximian.com
Tue, 29 Mar 2005 14:30:20 +0200


Can you please file a bug report in bugzilla.ximian.com about this?
Thanks!
Lluis.

On ds, 2005-03-26 at 10:47 +0100, Hans-Christian Holm wrote:
> The following illustrates a problem with the current implementaion of
> master pages in XSP2 (or the current 2.0 DLLs or wherever pages are
> compiled):
>  
> ---
>  
> <%@ Page Language="C#" MasterPageFile="m.master" %>
> <script runat="server">
>   void Page_Load(object sender, EventArgs e) {
>     // the following line does not compile
>     //b.Text = "HAHA";
>   }
> </script>
>  
> <asp:Content runat="server" ContentPlaceHolderID="cph1">
>   <asp:Label runat="server" id="b" Text="b" />
> </asp:Content>
> 
> ---
>  
> The "b" Label control ends up as "protected Label _bctrl_10" in the
> page object. In ASP.NET 2.0 Beta 1 and in XSP2 pages not using master
> pages, it becomes "protected Label b", as it should.
>  
> Master pages are something I've been wanting for a long time in
> ASP.NET, and Ireally look forward to the XSP2 release!
>  
> Hans-Christian
>