textbox text format in web app

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>
 
G

Guest

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
 
G

Guest

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top