fmardani
Programmer
- Jul 24, 2003
- 152
Hi,
The following code works fine in asp.net using vb.net but it gives the following error when the project is in c#. Do you know why?
Thanks
<SelectedItemTemplate>
»
<asp:HyperLink id=HyperLink2 runat="server" CssClass="DepartmentSelected" text='<%# DataBinder.Eval(Container.DataItem, "Name") %>' NavigateUrl='<%# "../default.aspx?DepartmentID=" & DataBinder.Eval(Container.DataItem,"DepartmentID") &"&DepartmentIndex=" & Container.ItemIndex %>'>
</asp:HyperLink>
</SelectedItemTemplate>
Error: Operator '&' cannot be applied to operands of type 'string' and 'object'
The following code works fine in asp.net using vb.net but it gives the following error when the project is in c#. Do you know why?
Thanks
<SelectedItemTemplate>
»
<asp:HyperLink id=HyperLink2 runat="server" CssClass="DepartmentSelected" text='<%# DataBinder.Eval(Container.DataItem, "Name") %>' NavigateUrl='<%# "../default.aspx?DepartmentID=" & DataBinder.Eval(Container.DataItem,"DepartmentID") &"&DepartmentIndex=" & Container.ItemIndex %>'>
</asp:HyperLink>
</SelectedItemTemplate>
Error: Operator '&' cannot be applied to operands of type 'string' and 'object'