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
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