Groups | Blog | Home
all groups > dotnet general > june 2007 >

dotnet general : textbox text format in web app


David
6/29/2007 7:44:03 AM
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>


Sivakumar G
7/1/2007 10:50:00 PM
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


[quoted text, click to view]
David
7/6/2007 7:24:00 AM
thanks for your reply.
I'm afraid that didn't do it.
I'm still getting the same error.

[quoted text, click to view]
AddThis Social Bookmark Button