RE: FN-FORUM: Form variables question
date posted 9th August 2005 14:18
I'm using ASP.Net so that's fine.
It's more that I'm using a bit of a shortcut to get a list of values
into an array and it's got the , as the separator.
I'm fine with it in classic ASP, but just chcking it's not handled in a
bizzare way with .NET even though, as pointed out, it's coming in a
different form.
Cheers
Andy
-----Original Message-----
From: [EMAIL REMOVED] [EMAIL REMOVED] On Behalf Of Robin
Vickery
Sent: Tuesday, August 09, 2005 2:38 PM
To: Andy Macnaughton-Jones
Subject: Re: FN-FORUM: Form variables question
On 9 Aug 2005 11:49:27 -0000, Andy Macnaughton-Jones [EMAIL REMOVED]
wrote:
>=20
> Hi,
> I'm just doing some form handling and was wondering how browsers=20
> handle the following;
>=20
> In the Uk, if we have a decimal number, e.g., 123.456 then if you have
> that in an input tag, e.g.,
>=20
>
>=20
> Then when it's submitted the request.form("txtValue") would be 123.456
>=20
> Now if you have multiple tags with the same name but different
> values, e.g.,;
>=20
> type=3D"text" name=3D"txtValue" value=3D"234.567" /> name=3D"txtValue" value=3D"345.678" />
>=20
> Then when you get a request.form("txtValue") you'd get=20
> "123.456,234.567,345.678"
>=20
> But for countries that use the , character as the decimal point, do=20
> you get "123,456,234,567,345,678" ? If so how do you get around the=20
> problem ? Is there any way to tell the browser to use a different=20
> character to , as a separator ?
>=20
The browser doesn't send it in that form at all, it's just the way the
ASP Request Object on the server side presents it.
The browser sends something like:
txtValue=3D123&txtValue=3D456&txtValue=3D234 [...]
You can get at individual values with request.form("txtValue")(1),
request.form("txtValue")(2) etc.
If you want an example, try this:
http://www.w3schools.com/asp/showasp.asp?filename=3Ddemo_form2
-robin
--
Freelancers, contractors earn more with Prosperity4 Call 0870 870 4414
or visit www.prosperity4.com and benefit from Inland Revenue approved
expenses today.
To advertise here: http://www.freelancers.net/advertising.html