-
text box question...
Hi to all...
I have a few text box's on my site and i would like to know how can i replace if a user enters a single quote ' and re-place it with nothing...
The problem i'm having is when a user enters a single quote i get an error on the page because this info gets inputed into a database...
Hope someone can help me...
Rino
-
-
You can take that textbox form object and run a Replace against it:
<code>
Dim strTextboxReplace
strTextBoxReplace - Request.Form("textbox_name_here")
'below, the data in the text box is going to be looked at and the
'single quotes will be replaced with nothing
strTextBoxReplace = Replace(textbox_name_here, "'", "")
</code>
---------- or better yet, if single quotes are needed, you could replace them with the ASCII value that will present the single quote in the HTML but not blow up any data access:
'below, the data in the text box is going to be looked at and the
'single quotes will be replaced with the ASCII value for a single quote:
strTextBoxReplace = Replace(textbox_name_here, "'", "'")
-
-
where would put this right after my textbox code
-
-
runescape items,buy runescape money,Runescape powerleveling,Runescape accounts
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks