[thelist] ASP help

Michael Robertson mike at mikeemedia.com
Tue Sep 10 10:25:01 CDT 2002


--
[ Picked text/plain from multipart/alternative ]
I'm trying to get these tables to write to a page only if the condition is True. The information stored in varSub1 and varSub2 are only dispalyed when True but the table itself always appears regardless of condition. Why is this and is there a way around it. Thanks

<%
If blnSub1=True Then
 Response.Write("<table border=""0"" cellspacing=""1"" cellpadding=""4"" style=""background-color:#ccc;width:150px"">")
        Response.Write("<tr>")
            Response.Write("<td style=""background-color:#56428b;font-size:11px;font-weight:bold;color:white;text-align:center"">Tip</td>")
        Response.Write("</tr>")
        Response.Write("<tr>")
            Response.Write("<td style=""background-color:#fff;font-size:11px;font-weight:bold;color:#ff6400;text-align:left"">" & varSub1 & "</td>")
        Response.Write("</tr>")
    Response.Write("</table>")
 Response.Write("<br /><br />")
End If
If blnSub2=True Then
    Response.Write("<table border=""0"" cellspacing=""1"" cellpadding=""4"" style=""background-color:#ccc;width:150px"">")
        Response.Write("<tr>")
            Response.Write("<td style=""background-color:#56428b;font-size:11px;font-weight:bold;color:white;text-align:center"">Tip</td>")
        Response.Write("</tr>")
        Response.Write("<tr>")
            Response.Write("<td style=""background-color:#fff;font-size:11px;font-weight:bold;color:#ff6400;text-align:left"">" & varSub2 & "</td>")
        Response.Write("</tr>")
    Response.Write("</table>")
 Response.Write("<br /><br />")
End If %>
--





More information about the thelist mailing list