Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

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

Status
Not open for further replies.

qsac

Programmer
Jan 22, 2002
242
US
BC30456: 'DataItem' is not a member of 'System.Web.UI.Control'.

Here is the code: I dont see what can be wrong. Has anyone ever seen this? Any help would be much appreciated.

Steve


<asp:Repeater
ID="rptAds"
runat="server" />
<itemtemplate>
<table width="585" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align=left><%# Container.DataItem("Title")%></td>
<td align=right><%# Container.DataItem( "Phone" ) %></td>
</tr>
</table>
</itemtemplate>
</asp:Repeater>
 
I think you want this syntax:

<%# DataBinder.Eval(Container, "DataItem.Title") %>

Greetings,
Dragonwell
 
That did the trick

This than made me think why did this line only not work. Than I looked at the database, column name Title! Brain Fart! renamed field name, and app works like a champ!

thanks for the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top