Search:
Namespaces
Discussions
.NET v1.1
Feedback
Templates
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngbeta' list
.
Baden Wehmeyer
Hi all,
When I create a template using
Page
.LoadTemplate(...) I get the
following error
Compiler Error Message: BC30456: The name 'DataItem' is not a member of
'System.Web.UI.Control'.
Source Error:
Line 1: <%#
DataBinder
.Eval(
Container
.DataItem, "Key") %> is
Line 2: <%#
DataBinder
.Eval(
Container
.DataItem, "Value") %>
So what is the directive for the acx file I load as a template? This is
not it:
Line 1: <%@
Control
language=3D"c#"
Inherits=3D"System.Web.UI.WebControls.RepeaterItem" %>=20
tia
baden
Reply to this message...
Stuart C. Salsbury
You might try casting your
Container
as a
WebControl
, assuming that it is
one.
eg.
<%#
DataBinder
.Eval(((WebControl)Container).DataItem, "Key")>
Regards,
Stuart Salsbury
Ernst & Young LLP
-----Original Message-----
From: Baden Wehmeyer
To: aspngbeta
Sent: 5/15/2001 11:19 AM
Subject: [aspngbeta] Templates
Importance: High
Hi all,
When I create a template using
Page
.LoadTemplate(...) I get the
following error
Compiler Error Message: BC30456: The name 'DataItem' is not a member of
'System.Web.UI.Control'.
Source Error:
Line 1: <%#
DataBinder
.Eval(
Container
.DataItem, "Key") %> is
Line 2: <%#
DataBinder
.Eval(
Container
.DataItem, "Value") %>
So what is the directive for the acx file I load as a template? This is
not it:
Line 1: <%@
Control
language="c#"
Inherits="System.Web.UI.WebControls.RepeaterItem" %>
tia
baden
Reply to this message...
Baden Wehmeyer
Thanks Stuart,
Yes I had to cast it to
RepeaterItem
, and I'm smiling again.
-----Original Message-----
From: Stuart C. Salsbury [mailto:
Click here to reveal e-mail address
]
Sent: 15 May 2001 05:49
To: aspngbeta
Subject: [aspngbeta] Re: Templates
You might try casting your
Container
as a
WebControl
, assuming that it
is
one.
eg.
<%#
DataBinder
.Eval(((WebControl)Container).DataItem, "Key")>
Regards,
Stuart Salsbury
Ernst & Young LLP
-----Original Message-----
From: Baden Wehmeyer
To: aspngbeta
Sent: 5/15/2001 11:19 AM
Subject: [aspngbeta] Templates
Importance: High
Hi all,
When I create a template using
Page
.LoadTemplate(...) I get the
following error
Compiler Error Message: BC30456: The name 'DataItem' is not a member of
'System.Web.UI.Control'.
Source Error:
Line 1: <%#
DataBinder
.Eval(
Container
.DataItem, "Key") %> is
Line 2: <%#
DataBinder
.Eval(
Container
.DataItem, "Value") %>
So what is the directive for the acx file I load as a template? This is
not it:
Line 1: <%@
Control
language=3D"c#"
Inherits=3D"System.Web.UI.WebControls.RepeaterItem" %>=20
tia
baden
| [aspngbeta] member
Click here to reveal e-mail address
=3D YOUR ID
|
http://www.asplists.com/asplists/aspngbeta.asp
=3D JOIN/QUIT
Reply to this message...
System.ComponentModel.Container
System.Web.UI.Control
System.Web.UI.DataBinder
System.Web.UI.Page
System.Web.UI.WebControls.RepeaterItem
System.Web.UI.WebControls.WebControl
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com