By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,489 Members | 1,954 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,489 IT Pros & Developers. It's quick & easy.

decimal places

P: n/a
Hi All
can anyone tell me the easiest way to make sure numbers get passed with 2
decimal places?

ie:
<select name="TagCost" id="TagCost">
<option value="25.00">1 @ 25.00</option>
<option value="50.00">2 @ 25.00</option>
</select>

fprice=request("TagCost") <------- need to make sure this is 25.00 not 25

TIA


Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
1) dont use Request() use Request.Form()/Request.QueryString()/etc. Wont
effect the outcome but it's propper.
2) it will come through as that value unless you run a convertion on it to
something else. ensure your decimals by doing a convert to dec.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"SusieQ" <rh@bloofrog.net> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi All
can anyone tell me the easiest way to make sure numbers get passed with 2
decimal places?

ie:
<select name="TagCost" id="TagCost">
<option value="25.00">1 @ 25.00</option>
<option value="50.00">2 @ 25.00</option>
</select>

fprice=request("TagCost") <------- need to make sure this is 25.00 not
25

TIA


Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.