944,221 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 5409
  • ASP RSS
Mar 2nd, 2005
0

" ' " and post method : use of replace function ?

Expand Post »
Hello,

My question is about an HTML form using "POST" method.

I'm using a simple HTML form, from which I get back my variables with this code :
sLastName = Request.Form.Item("LastName")
This work correctly.

But when the user fill the blank field with a string containing " ' ", I only get the first part of the field, before the '.
I've tried to use the following code instead :

sLastName = Replace(Request.Form.Item("LastName"),"'","''")

But this doesn't work anymore.

Any ideas on how to get the full field with the " ' " ?

Regards.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Forikan is offline Offline
1 posts
since Mar 2005
Mar 2nd, 2005
0

Re: " ' " and post method : use of replace function ?

Code:

Dim sLastName
sLastName = Request.Form("LastName")
sLastName = Replace(sLastName, "'", "''")
Reputation Points: 10
Solved Threads: 3
Junior Poster in Training
dexterz is offline Offline
86 posts
since Feb 2005
Mar 6th, 2005
0

Re: " ' " and post method : use of replace function ?

sLastName = Replace(sLastName, "'", "´")

You will get I'm rather than I"m
Reputation Points: 10
Solved Threads: 7
Posting Whiz in Training
zippee is offline Offline
294 posts
since Jan 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: Remove Pop Up
Next Thread in ASP Forum Timeline: Help adding records





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC