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

Reply

Join Date: Mar 2005
Posts: 1
Reputation: Forikan is an unknown quantity at this point 
Solved Threads: 0
Forikan Forikan is offline Offline
Newbie Poster

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

 
0
  #1
Mar 2nd, 2005
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 86
Reputation: dexterz is an unknown quantity at this point 
Solved Threads: 3
dexterz dexterz is offline Offline
Junior Poster in Training

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

 
0
  #2
Mar 2nd, 2005
Code:

Dim sLastName
sLastName = Request.Form("LastName")
sLastName = Replace(sLastName, "'", "''")
Dexter Zaf
Ex-designz.net
Reply With Quote Quick reply to this message  
Join Date: Jan 2005
Posts: 294
Reputation: zippee is an unknown quantity at this point 
Solved Threads: 6
zippee's Avatar
zippee zippee is offline Offline
Posting Whiz in Training

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

 
0
  #3
Mar 6th, 2005
sLastName = Replace(sLastName, "'", "´")

You will get I'm rather than I"m
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC