'Table' cannot have children of type 'ListViewDataItem'
- by kazim sardar mehdi
I was using System.Web.UI.WebControls.Table
System.Web.UI.WebControlsTableRow
System.Web.UI.WebControls.TableCell
objects inside LayoutTemplate’s InstantiateIn method that’s inherited from ITemplateas stated below:Table = new Table(); when compile got the following error on the YPOD(Yellow page of Death)
'Table' cannot have children of type 'ListViewDataItem'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: 'Table' cannot have children of type 'ListViewDataItem'.
Solution:
I Replaced System.Web.UI.WebControls.Table
System.Web.UI.WebControls.TableRow
System.Web.UI.WebControls.TableCell
withSystem.Web.UI.HtmlControls.HtmlTable
System.Web.UI.HtmlControls.HtmlTableRow
System.Web.UI.HtmlControls.HtmlTableCell
and problem solved.