[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 illustrates a =
problem with=20
the current implementaion of master pages in XSP2 (or the current =
2.0 DLLs=20
or wherever pages are compiled):</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>---</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><%@ Page Language=3D"C#" =
MasterPageFile=3D"m.master"=20
%><BR><script runat=3D"server"></FONT></DIV>
<DIV><FONT face=3DArial size=3D2> void Page_Load(object sender, =
EventArgs e)=20
{<BR> // the following line does not=20
compile<BR> //b.Text =3D "HAHA";<BR> }</DIV>
<DIV></script></DIV>
<DIV> </DIV>
<DIV><asp:Content runat=3D"server" =
ContentPlaceHolderID=3D"cph1"><BR> =20
<asp:Label runat=3D"server" id=3D"b" Text=3D"b"=20
/><BR></asp:Content><BR></DIV>
<DIV>---</DIV>
<DIV> </DIV>
<DIV>The "b" Label control ends up as "protected Label _bctrl_10" =
in the=20
page object. In ASP.NET 2.0 Beta 1 and in XSP2 pages not using =
master=20
pages, it becomes "protected Label b", as it should.</DIV>
<DIV> </DIV>
<DIV>Master pages are something I've been wanting for a long time in =
ASP.NET,=20
and Ireally look forward to the XSP2 release!</DIV>
<DIV> </DIV>
<DIV>Hans-Christian</DIV>
<DIV> </DIV></FONT></BODY></HTML>
------=_NextPart_000_001B_01C531F1.41C276F0--