I have the following statement:
<INPUT TYPE="text" NAME="FormFieldName"
VALUE="<% response.write RSItem("FieldName"
%>"
SIZE=10 MAXLENGTH=10 >
The problem is that the field from the database contains quotes so the VALUE = "aValue" is getting messed up because the quotes in the field are acting to short-circuit the percieved end of value field.
SO - is there a way to use alternatives to " to surround values? I'm imagining something like the following pseudo-code, but I'm not sure if its legal - any ideas?
if containsQuotes(RSItem("FieldName"
) then
VALUE=[<% response.write RSItem("FieldName"
%>]
else
VALUE="<% response.write RSItem("FieldName"
%>"
end if
<INPUT TYPE="text" NAME="FormFieldName"
VALUE="<% response.write RSItem("FieldName"
SIZE=10 MAXLENGTH=10 >
The problem is that the field from the database contains quotes so the VALUE = "aValue" is getting messed up because the quotes in the field are acting to short-circuit the percieved end of value field.
SO - is there a way to use alternatives to " to surround values? I'm imagining something like the following pseudo-code, but I'm not sure if its legal - any ideas?
if containsQuotes(RSItem("FieldName"
VALUE=[<% response.write RSItem("FieldName"
else
VALUE="<% response.write RSItem("FieldName"
end if