Hello Everyone, Had a quick question regarding ASP Classic. I am using a variable to put a querystring value into a form text field. It works just fine except for the occasions where there is a single quotation in the middle of the ItemName. Example: 6" PVC 90. In these cases it truncates the ItemName in the form text field. I can use response.write to display it at the top of the page, but it will not fill in the text field beyond the ". That said if I add the item to my table the entire string is still there. Is there a way to get it displayed correctly in the text field? As always any help is very much appreciated.
You should use Server.HTMLEncode whenever saving values to your table that could have quotes in them (single or double). I cover this in ASP 103, I believe.
Joe HoodOP
@Reply 4 years ago
Got it my Friend! I will head back to ASP 103 and re-watch. Now that you mention it, I do remember you teaching that. Very much appreciated. :)
Joe HoodOP
@Reply 4 years ago
Worked like a charm for the in-string single and double quotes. However i still have quite a few # symbols and the &'s in our Item Names. Is there a way to handle those as well.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Active Server Pages Forum.