| | |
" ' " and post method : use of replace function ?
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Mar 2005
Posts: 1
Reputation:
Solved Threads: 0
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.
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.
•
•
Join Date: Feb 2005
Posts: 86
Reputation:
Solved Threads: 3
Code:
Dim sLastName
sLastName = Request.Form("LastName")
sLastName = Replace(sLastName, "'", "''")
Dim sLastName
sLastName = Request.Form("LastName")
sLastName = Replace(sLastName, "'", "''")
Dexter Zaf
Ex-designz.net
Ex-designz.net
![]() |
Similar Threads
- Replace Function, Please Help!!!!! (Visual Basic 4 / 5 / 6)
- how to send data in POST method using javascript (JavaScript / DHTML / AJAX)
- Codes for "Find" and for "Tip of the day" (Visual Basic 4 / 5 / 6)
- Method help that calculates a function (Java)
- ASP Replace Function.... (ASP)
Other Threads in the ASP Forum
- Previous Thread: Remove Pop Up
- Next Thread: Help adding records
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection dreamweaver excel fso iis msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption single specfic sqlserver sqlserverconnection windows7





