468,727 Members | 1,667 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,727 developers. It's quick & easy.

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 2404

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Robson Carvalho Machado | last post: by
12 posts views Thread by Charles Astwood | last post: by
5 posts views Thread by slowmotiongenius | last post: by
8 posts views Thread by Mangler | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.