BC30456: 'DataItem' is not a member of 'System.Web.UI.Controls'

BC30456: 'DataItem' is not a member of 'System.Web.UI.Controls'

Post by nosco » Tue, 14 May 2002 11:03:17



Hi

  I have been getting the above error whenever I use the
codes below.

<asp:DataGrid id="MyList" runat="server"
AutoGenerateColumns="false" />
<Columns>
<asp:TemplateColumn HeaderText="Someheader">
<ItemTemplate>
<asp:Label id="whatheader" runat="server" Text='<%#
Container.DataItem("title")%>' />
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:Datagrid>

Any idea why? I have also used <%# Databinder.Eval
(container.DataItem, "title") %> with the same error.

pls help. thanks in adv.

 
 
 

1. BC30456: 'DataItem' is not a member of System...blah blah Compilation Error

Hi! I wonder if anyone could help me...I've been trying
to work on this for hours now and I'm very frustrated. I
have a Mobile List and I need to attach a link or a
navigation url to each item so I went to create an Item
Template as mobile:link. Now I'm trying to bind the
templated link to a datasource and this is the error that
I get.

"BC30456: 'DataItem' is not a member
of 'System.Web.UI.MobileControls.TemplateContainer'"

<mobile:List id="lstData" runat="server"
ItemsAsLinks="True">
   <DeviceSpecific>
      <Choice Filter="isHTML32">
          <ItemTemplate>                          
             <mobile:Link Runat="server" NavigateUrl='<%#
DataBinder.Eval((Container).DataItem,"#
frmPerSubject.aspx?value={0}","# frmPerSubject.aspx?value=
{0}")%>'>
                                                        <%
# DataBinder.Eval((Container).DataItem,"sSubject")%>      
            </mobile:Link>
          </ItemTemplate>
        </Choice>
   </DeviceSpecific>
</mobile:List>

   What am I doing wrong? Thank you in advance for the
help.

Aileen

2. port mirroring problem in C6509

3. BC30456: The name 'DataItem' is not a member of 'System.Web.UI.Control'. Please help!!!

4. Need help with design issue

5. MSVC6: choose which VSS DB to open?

6. BibTeX files

7. Cannot implicitly convert type 'object' to 'System.Web.UI.WebControls.TextBox'

8. 'System.Web.HttpResponse' does not contain a definition for 'QueryString'

9. System.InvalidCastException: Cast from type 'DBNull' to type 'String' is not valid

10. 'System.Data.SQL.SQLDataType' does not contain a definition for 'tid'

11. 'System.Messaging.Message' does not contain a definition for 'InnerHtml'