asp classic - Escape asp/vbscript script tags -


how escape asp directive output

so need print page string asp tags

<% response.write "<%=count%>" %> 

but error

 microsoft vbscript compilation error '800a0409' unterminated string constant 

so how print script tags?

so need <%=count%> not count

there way instead of ?

<%     response.write "<" & "%=count%" & ">" %> 

you need make sure html encode before attempting use response.write() this;

here use html encoded value of % &#37 stop vbscript run-time spitting it's dummy (but can use &lt; < , &gt; > has been suggested).

<% response.write "<&#37=count&#37>" %> 

outputs:

 <%=count%> 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -