type mismatch on HTMLEncode

Results 1 to 2 of 2

Thread: type mismatch on HTMLEncode

  1. #1
    Join Date
    Dec 1969

    Default type mismatch on HTMLEncode

    I am trying to use the following code:<BR><BR>Set objFSO = Server.CreateObject("Scripting.FileSystemObject")< BR>Set objOpenFile = objFSO.OpenTextFile(Server.MapPath(strReferrer), _<BR>ForReading<BR><BR>Do Until objOpenFile.AtEndOfStream<BR>strLine = objOpenFile.ReadLine<BR>If InStr(1, strLine, "&#060;!--content_start--&#062;") &#060;&#062; 0 Then<BR>strMessBody = strMessBody + strLine<BR>End If<BR>Loop<BR><BR>Somewhere in there I need to HTMLEncode strMessBody. every way I have tried<BR>it so far has produced a type mismatch.

  2. #2
    J. Paul Schmidt Guest

    Default Server.HTMLEncode() Example

    You wrote:<BR>&#060;&#060;<BR>Somewhere in there I need to HTMLEncode strMessBody. every way I have tried it so far has produced a type mismatch.<BR>&#062;&#062;<BR><BR>Perhaps at the end of your code put in something like this:<BR>strMessBody = Server.HTMLEncode(strMessBody)<BR><BR>But keep in mind that if you are creating a querystring that you probably would want to do Server.HTMLEncode() on EACH value after an equals sign instead of on the URL as a whole.<BR><BR>Best regards,<BR>-Paul<BR><BR>J. Paul Schmidt, MBA<BR>Databases on the Web<BR>http://www.Bullschmidt.com<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts