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

Hans-Christian Holm hchrholm@online.no
Sat, 26 Mar 2005 10:47:50 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_001B_01C531F1.41C276F0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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=3D"C#" MasterPageFile=3D"m.master" %>
<script runat=3D"server">
  void Page_Load(object sender, EventArgs e) {
    // the following line does not compile
    //b.Text =3D "HAHA";
  }
</script>

<asp:Content runat=3D"server" ContentPlaceHolderID=3D"cph1">
  <asp:Label runat=3D"server" id=3D"b" Text=3D"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

------=_NextPart_000_001B_01C531F1.41C276F0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2604" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>The following&nbsp;illustrates&nbsp;a =
problem with=20
the current implementaion of master pages in XSP2 (or the current =
2.0&nbsp;DLLs=20
or wherever pages are compiled):</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>---</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;%@ Page Language=3D"C#" =
MasterPageFile=3D"m.master"=20
%&gt;<BR>&lt;script runat=3D"server"&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; void Page_Load(object sender, =
EventArgs e)=20
{<BR>&nbsp;&nbsp;&nbsp; // the following line does not=20
compile<BR>&nbsp;&nbsp;&nbsp; //b.Text =3D "HAHA";<BR>&nbsp; }</DIV>
<DIV>&lt;/script&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;asp:Content runat=3D"server" =
ContentPlaceHolderID=3D"cph1"&gt;<BR>&nbsp;=20
&lt;asp:Label runat=3D"server" id=3D"b" Text=3D"b"=20
/&gt;<BR>&lt;/asp:Content&gt;<BR></DIV>
<DIV>---</DIV>
<DIV>&nbsp;</DIV>
<DIV>The "b" Label control ends up as "protected Label&nbsp;_bctrl_10" =
in the=20
page object. In ASP.NET 2.0 Beta 1 and in XSP2&nbsp;pages not using =
master=20
pages, it becomes "protected Label b", as it should.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Master pages are something I've been wanting for a long time in =
ASP.NET,=20
and Ireally look forward to&nbsp;the XSP2 release!</DIV>
<DIV>&nbsp;</DIV>
<DIV>Hans-Christian</DIV>
<DIV>&nbsp;</DIV></FONT></BODY></HTML>

------=_NextPart_000_001B_01C531F1.41C276F0--