469,628 Members | 1,068 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

manipulate forms collection

Hi
Is there a way to manipulate (ie change) the items in the forms
collection. I simply want to get rid of the infamous apostrophe in input
from a form, replace ' with ''. I had hoped to be able just to make the
change and then put it back into the Form.item. Is there a way to do
this?
If not, would the best way to save the result be to build an array,
which is then used instead of the forms collection?
My programming is not making progress at the moment due to lack of time,
so I want to find out the simplest solution
Mats

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
1 1573

"Mats" <ma**@nospamdatabyggarna.se> wrote in message
news:ud**************@TK2MSFTNGP10.phx.gbl...
Hi
Is there a way to manipulate (ie change) the items in the forms
collection. I simply want to get rid of the infamous apostrophe in input
from a form, replace ' with ''. I had hoped to be able just to make the
change and then put it back into the Form.item. Is there a way to do
this?
The form collection is read-only, so no, you cannot do that.

If not, would the best way to save the result be to build an array,
which is then used instead of the forms collection?
My programming is not making progress at the moment due to lack of time,
so I want to find out the simplest solution
Why do you want to change the form data or pull it out just to put it in
something else? Aren't you processing your form data? If you really wanted
to, you could put the data in a two dimensional array as such:
Dim aForm()
Dim i
i = 0
For Each thing In Request.Form
Redim Preserve aForm(1, i)
aForm(0, i) = thing
aForm(1, i) = Replace(Request.Form(thing), "'", "''")
i = i + 1
Next

That would make the first dimension the element name, and the second one the
value, while replacing ' with ''.

Ray at home
Mats

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Soryt | last post: by
6 posts views Thread by Edwinah63 | last post: by
5 posts views Thread by Simon Verona | last post: by
15 posts views Thread by Alex | last post: by
12 posts views Thread by Peter Van Wilrijk | last post: by
2 posts views Thread by Yuk Tang | last post: by
18 posts views Thread by Jerry Boone | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.