Hi all,
When I enter data into my database I replace single quotations with doubles (e.g: " to "" and ' to ''). Then when I want to post it back out to the user I replace double quotations with singles (e.g: "" to " and '' to ').
However when I input these into text box values if the string contains a quotation it prematurely ends the value attribute.
Then when I want to show the variable in a textbox the string gets cut short. (If I have this string: 'He said, "Hi!"', it'll only show: 'He said, '). This is the code for this:
FineAmount has already been through the replace statement to change double quotations to singles.
Any thoughts on how to post the string in its full length?
When I enter data into my database I replace single quotations with doubles (e.g: " to "" and ' to ''). Then when I want to post it back out to the user I replace double quotations with singles (e.g: "" to " and '' to ').
However when I input these into text box values if the string contains a quotation it prematurely ends the value attribute.
Code:
strToCheck = Replace(strToCheck, """", """""") ' This is my code to replace single quotations to doubles when entering it into database
strToCheck = Replace(strToCheck, """""", """") ' This is my code to replace double quotations to singles when displaying it in the browser
Then when I want to show the variable in a textbox the string gets cut short. (If I have this string: 'He said, "Hi!"', it'll only show: 'He said, '). This is the code for this:
Code:
<input type="text" name="FineAmount" style="Width: 90%;" value="<%=FineAmount%>">
FineAmount has already been through the replace statement to change double quotations to singles.
Any thoughts on how to post the string in its full length?