S
Steve
I hope that there is a simple answer to this question...
Does anyone know how to set the ExtractTemplateRows property of a DataList
to true when loading templates for a DataList (here, "DataList1") dynamically
using LoadTemplate without generating the error:
"A Table control was not found in the template for 'DataList1' for an item
of type 'ListItemType.Item'. "
This will occur even if there is a table in the template file. For examle:
....
DataList1.ItemTemplate = Page.LoadTemplate("template.ascx");
....
--------------------------------------
Contents of "template.ascx":
<%@ Control Language="c#" %>
<asp:Table runat=server>
<asp:TableRow>
<asp:TableCell>Test</asp:TableCell>
</asp:TableRow>
</asp:Table>
Thanks - S
Does anyone know how to set the ExtractTemplateRows property of a DataList
to true when loading templates for a DataList (here, "DataList1") dynamically
using LoadTemplate without generating the error:
"A Table control was not found in the template for 'DataList1' for an item
of type 'ListItemType.Item'. "
This will occur even if there is a table in the template file. For examle:
....
DataList1.ItemTemplate = Page.LoadTemplate("template.ascx");
....
--------------------------------------
Contents of "template.ascx":
<%@ Control Language="c#" %>
<asp:Table runat=server>
<asp:TableRow>
<asp:TableCell>Test</asp:TableCell>
</asp:TableRow>
</asp:Table>
Thanks - S