473,385 Members | 1,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 3087
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 anyone can tell me how I should properly cast the...
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 to see 01/01/2004 instead of 1/1/2004 8:00:00 AM. ...
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 reading them all - but I think I have a differing...
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 into one? In this example say the textbox you...
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 NumericMaskedTextBox Inherits System.Windows.Forms.TextBox ...
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 typed by the user. Other times 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 save this data to a file. Is there any global way...
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 also using the "strict type semantic" settings that...
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, I put this data into a text area like this:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.