J
JV
I just converted a big web project from VB.NET to C# and I got some very
strange runtime errors. Apparently, throughout the ASPX pages, the VB
version of this project used the expression <%#
Container.DataItem("columnName") %> inside an <ItemTemplate> tag for
DataGrid. Apparently though this works fine in VB.NET, for some reason C#
chokes on it. I have found that replacing those expressions with <%#
DataBinder.Eval(Container.DataItem, "columnName")%> makes the errors go
away, but I can't figure out why. It seems to me that the evaluation of
data binding expressions embedded in the ASPX page should work identically
in both languages?
Can anyone explain the arcane rules of this syntax?
strange runtime errors. Apparently, throughout the ASPX pages, the VB
version of this project used the expression <%#
Container.DataItem("columnName") %> inside an <ItemTemplate> tag for
DataGrid. Apparently though this works fine in VB.NET, for some reason C#
chokes on it. I have found that replacing those expressions with <%#
DataBinder.Eval(Container.DataItem, "columnName")%> makes the errors go
away, but I can't figure out why. It seems to me that the evaluation of
data binding expressions embedded in the ASPX page should work identically
in both languages?
Can anyone explain the arcane rules of this syntax?