wseaward
asked on
Apostrophe in VBScript on an ASP page
I have an apostrophe problem showing up on an ASP page. The apostrophe acts like a delimiter and I tried just about everything. I'm using a Response.Write statement like this...
Response.Write(CHR(13) & "<td class='resultsrow" & intRow & "'><INPUT type=checkbox name='clipboard" & intClipBoardNumber & "' value='http://" & sLink & "/documents/" & sRadarFileNumber & " " & sValue & "'></td>")
The problem is when sValue has an apostrophe in it. I tried to replace the apostrophe with douple apostrophes and this doesn't work because of the apostrophe after "value=".
Response.Write(CHR(13) & "<td class='resultsrow" & intRow & "'><INPUT type=checkbox name='clipboard" & intClipBoardNumber & "' value='http://" & sLink & "/documents/" & sRadarFileNumber & " " & sValue & "'></td>")
The problem is when sValue has an apostrophe in it. I tried to replace the apostrophe with douple apostrophes and this doesn't work because of the apostrophe after "value=".
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Use Server.URLEncode(sValue)
MrClean