textbox text format in web app

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am upgrading a .net web app from VS2003 to VS2005 and I'm having problem
with a line of asp code.

The following code snippet resides within an asp:datagrid object.

There is no problem in VS2003. In VS2005, I am getting an error: "The name
format does not exist in the current context".
Can someone point out to me what needs changing?
thanks.

<ItemTemplate>
<asp:TextBox id="subTotal" runat="server" Text='<%#
format(cdbl(DataBinder.Eval(Container.DataItem, "ItemCount") *
DataBinder.Eval(Container.DataItem, "ItemPrice")),"##,##0.00") %> ' />
</ItemTemplate>
 
Try adding the VB compatibility assembly reference to your VS 2005 web
project or change your Web.config as follows:

<compilation debug="false">
<assemblies>
<add assembly="Microsoft.VisualBasic.Compatibility, Version=8.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
</compilation>

HTH

Siva
 
thanks for your reply.
I'm afraid that didn't do it.
I'm still getting the same error.
 
Back
Top