473,396 Members | 1,917 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,396 software developers and data experts.

Asp to Aspx, Response.Write Recordset.fields(1).value question

I'm migrating one Asp page to Aspx.
There is a recordset and I need to Reponse.write the content of one of its
fields .
That field comes from a Numeric(5,2) SQL datatype
Its content is : 90.00

In Asp, the instruction

Response.Write Recordset.Fields(1).value

returns 90 (the trailing zero are automatically eliminated)
while in Aspx

Response.Write(Recordset.Fields(1).value)

return 90.00 (the trailing zero are NOT automatically eliminated)
It seems to be a problem of implicit/explicit conversion from to
string/decimal datatypes.

How can I obtain the same result (90) in aspx without having to force
particular convertions?
(for example the following will work
Response.Write( VAL (Recordset.Fields(1).value) )

but since I've a lot of page to convert with a lot of fields, I'm searching
for a solution that implies
something like a Global option to be set, without having to search for all
the decimal fields and then convert them.
)

sorry for my bad english

Thanks
GPC
Nov 18 '05 #1
0 2554

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

Similar topics

5
by: Niall Porter | last post by:
Hi All, Using Win2k SP4, no .NET stuff just plain ASP using JScript as serverside scripting language. Early in my .asp file I have this bit of code : <%@LANGUAGE="JAVASCRIPT"...
8
by: Jack | last post by:
Hi, Here is my problem: I am logging in to a page, where the page retrieves a record from a database. The text boxes are used in the display formto let the users update the fields, if they...
1
by: Robson Carvalho Machado | last post by:
Dear Friends, I was using the below code in ASP to dynamically generate XML from a SQL Query Does anyone knows how can I migrate this code to VB and ASPX? Regards Robson Machado ...
13
by: Jan | last post by:
Hi I have a database that I use to keep track of the sales promotions that we send to companies. I normally send a mailing based on a subset of the companies in the database (found using the...
12
by: Charles Astwood | last post by:
Hi, just starting out working my way round C Sharp and aspx. Used to write all my sites in asp and just need a few pointers in how to display data. I have made a connection to my SQL2000...
17
by: raj chahal | last post by:
Hi there I need to be able to print on screen when I check if a value within a db <td> <% if ((Recordset1.Fields.Item("profile1").Value) <> "") then response.Write"Pro1<br>" &...
5
by: slowmotiongenius | last post by:
All- I have established an adodb recordset in my code-behind, and I need to pass it to the aspx file. I can't seem to figure out if there is a way to do this. I see you can pass a string over...
8
by: Mangler | last post by:
Here is an easy one for the pros, yet hard for me (newbie). If my recordset is empty I want to write "Not Complete" and if there is a value, I want to write the value. Can someone tell me what I...
3
by: Simon Gare | last post by:
Hi All, having a problem with the error "Either BOF or EOF is True, or the current record has been deleted. " found a workaround that allows the non existent data to be bypassed and insert a 0...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.