472,342 Members | 1,525 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,342 software developers and data experts.

textbox text format in web app

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>

Jun 29 '07 #1
2 3057
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
"David" wrote:
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>
Jul 2 '07 #2
thanks for your reply.
I'm afraid that didn't do it.
I'm still getting the same error.

"Sivakumar G" wrote:
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
"David" wrote:
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>

Jul 6 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: I am Sam | last post by:
I have a DataGrid that is passing information to a stored procedure properly but the parameters aren't being casted properly. I was woundering if...
1
by: Rich | last post by:
Hello, I have some datefields in a dataset (ds1). I bind some textbox controls on a windows form to these date fields in ds1, but I only want...
11
by: Keith | last post by:
I apologize for those of you who think I'm posting on the same topic. It is not that I don't appreciate all of your comments - and I'm definitely...
2
by: Peter | last post by:
I hate using the mask edit conrol so I created these two function to format my phone numbers. Is there a way to consolidate these two functions...
3
by: Aaron Smith | last post by:
I found an quick and dirty example of a numeric text box that converts the string to a currency mask.. Here is the code: Public Class...
4
by: Art | last post by:
Hi, I have a MyTextBox class that inherits from TextBox. How do I make it display the information as, say 0.00. Sometimes the value will be...
2
by: Adam Honek | last post by:
I have a form. It has serveral text boxes for user data entry. I could of course write code to check if each is empty before proceeding to...
5
by: YardDancer | last post by:
Hi all I don't want to use the the Cint() or CDec() or other VB.Net Functions and I dont want to restrict keystrokes in the textbox. I am...
9
by: =?Utf-8?B?dHBhcmtzNjk=?= | last post by:
OK I have some Chinese text in sql server column that looks like this: 12大专题调研破解广东科学发展难题 This is unicode? Anyway,...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.