Compilation Error is:"CS0021: Cannot apply indexing with  to an expression of type 'object'".
How can I solve this problem? I tried to change "" into "()", but I got another error "CS0118: System.Web.UI.WebControls.DataGridItem.DataItem' denotes a 'property' where a 'method' was expected"
Line 74:<ASP:Templatecolumn HeaderText="Article Title">
Line 75: <itemTemplate>
Line 76: <a href=articleupdate.aspx?articleid=<%#Container.DataItem["articleid"]%>&colid=<%#Container.DataItem["colid"]%>><%#Container.DataItem["subject"]%></a>
Line 77: </itemTemplate>
Line 78:</ASP:Templatecolumn>Thursday, June 29, 2006 2:12 PM
I am sorry I haven't quite understood you.
In my library file, the class is "articlecolumn", so I tried to rewrite this line as follows:
<%# (Container.DataItem as articlecolumn)["articleid"]%>
This time, the compilation error is :CS0021: Cannot apply indexing with  to an expression of type 'article.articlecolumn'
How should I do?Friday, June 30, 2006 1:12 AM