I'm developing an ASP (Classic) page and on this page I have this:
<%if(textocontrato) = "NULL" Then%>
<td >Texto Contrato</td>
<td ><input type="text" name="textocontrato" value="<%=textocontrato%>" size=30 maxlength=30></td>
<%Else %>
<td >Texto Contrato</td>
<td ><input type="text" name="textocontrato" value="<%=Server.HTMLEncode(textocontrato)%>" size=30 maxlength=30></td>
<%End If%>
What I want is that if textocontrato
is = NULL
executes the HTML from above if not NULL
executes the bottom, however even when textocontrato
it is null
it runs underneath and ends up giving me error, because the HTMLEncode is not receiving anything.
What am I doing wrong?