"") Then myStr...">

Type mismatch: 'Server.HTMLEncode' ASP

I need to encode the contents of the record, and I use this code:

If(rsScadenze("testo") <> "") Then myString = rsScadenze("testo") 'this is a result of a query myEncodeString=Server.HTMLEncode(myString) 'here there is my error 

Can someone help me?

thanks

+4
source share
2 answers

Is the result your NULL entry?

Try Server.HTMLEncode (rsScadenze ("testo") and "")

+10
source

change

If (rsScadenze ("testo") <> "") Then

to

If ("" and rsScadenze ("testo") <> "") Then

why?

in case rsScadenze ("testo") returns as null, adding to it, "makes it"

this is an easier way to deal with potential zeros.

0
source

Source: https://habr.com/ru/post/1397769/


All Articles