Geeks With Blogs

News
kazim 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 ITemplate
as 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 
with
System.Web.UI.HtmlControls.HtmlTable 
System.Web.UI.HtmlControls.HtmlTableRow
System.Web.UI.HtmlControls.HtmlTableCell 
and problem solved.
 
Posted on Thursday, January 27, 2011 5:34 PM asp.net , ListView | Back to top


Comments on this post: 'Table' cannot have children of type 'ListViewDataItem'

# re: 'Table' cannot have children of type 'ListViewDataItem'
Requesting Gravatar...
Thank you!
Left by Shay N on Jun 03, 2011 12:15 AM

Your comment:
 (will show your gravatar)


Copyright © kazim sardar mehdi | Powered by: GeeksWithBlogs.net