Probelm with embed server controls

  • Thread starter Benjamin Bittner
  • Start date
B

Benjamin Bittner

Hi NG,
i have a problem using this code:

<asp:Repeater ID="rpElemente" Runat="server"
OnItemDataBound="rpItemDataBound">
<HeaderTemplate>
<asp:Table id="table" runat="server">
<asp:TableRow id="row" runat="server">
</HeaderTemplate>
<ItemTemplate>
<asp:TableCell id="cell" runat="server">
<asp:HyperLink ID="link" Runat="server"
NavigateUrl='index.aspx?zeige=<%# DataBinder.Eval(Container.DataItem,
"IDNavigation") %>'>
<%# DataBinder.Eval(Container.DataItem, "Titel") %>
</asp:HyperLink>
</asp:TableCell>
</ItemTemplate>
<FooterTemplate>
</asp:TableRow>
</asp:Table>
</FooterTemplate>
</asp:Repeater>

The error msg im getting:

System.Web.UI.HtmlControls.HtmlTableCellCollection must have items of type
'System.Web.UI.HtmlControls.HtmlTableCell'.
'ItemTemplate' is of type 'System.Web.UI.HtmlControls.HtmlGenericControl'

The same error (except for the type declarations) is thrown when using
<table id="table" runat="server"> instead of <asp:Table>. What i wanna be
able to do, is to edit the table and td attributes in the codebehind module.
Inst there a way to accomplish this or a workaround maybe?

thx in advance
regards benni
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top