S
sck10
Hello,
I am calling a function using vb and want to convert it to c#. When moving
from vb 1.1 to vb 2.0, I can use the following: text='<%#
AddBlankRowMenu(Eval("strMenuType")) %>' to call the function. I no longer
need to use "DataBinder.Eval(Container,"DataItem." in front of the DataItem.
However, when I tried to use the new syntax in c#, I got an error. However,
the older syntax works.
Am I missing something, or does c# require the longer syntax as shown below?
--
Thanks, sck10
vb: asp.net 1.1
<asp:Literal id="ltrNewLine" text='<%#
AddBlankRowMenu(DataBinder.Eval(Container,"DataItem.strMenuType")) %>'
runat="server" />
vb: asp.net 2.0
<asp:Literal id="ltrNewLine" text='<%# AddBlankRowMenu(Eval("strMenuType"))
%>' runat="server" />
c#: asp.net 2.0
<asp:Literal id="ltrNewLine" text='<%#
AddBlankRowMenu(DataBinder.Eval(Container,"DataItem.strMenuType")) %>'
runat="server" />
I am calling a function using vb and want to convert it to c#. When moving
from vb 1.1 to vb 2.0, I can use the following: text='<%#
AddBlankRowMenu(Eval("strMenuType")) %>' to call the function. I no longer
need to use "DataBinder.Eval(Container,"DataItem." in front of the DataItem.
However, when I tried to use the new syntax in c#, I got an error. However,
the older syntax works.
Am I missing something, or does c# require the longer syntax as shown below?
--
Thanks, sck10
vb: asp.net 1.1
<asp:Literal id="ltrNewLine" text='<%#
AddBlankRowMenu(DataBinder.Eval(Container,"DataItem.strMenuType")) %>'
runat="server" />
vb: asp.net 2.0
<asp:Literal id="ltrNewLine" text='<%# AddBlankRowMenu(Eval("strMenuType"))
%>' runat="server" />
c#: asp.net 2.0
<asp:Literal id="ltrNewLine" text='<%#
AddBlankRowMenu(DataBinder.Eval(Container,"DataItem.strMenuType")) %>'
runat="server" />