|
|
|
|
|
| | |
|
Active Server Pages ASP programs help tutorial tutorials routine routines jobs listserve mailinglist bulletin board bulletin boards programming snippet snippets CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Hiding HTML Code using VBScript within and ASP |
From: |
Jeremy |
Date: |
5/9/2001 3:49:49 PM |
IP: |
170.253.240.1 |
I'm trying to hide some html code using vbscript. This all resides within an ASP page. What I'm attempting to do is based on a result set from a database connection hide a specific section of html code using an if statement. Here is the code:
<%
strIDNum= Request.Cookies("USER_INFO")("PersonnelNumber")
set rsSecurity = server.CreateObject("ADODB.RECORDSET")
rsSecurity.ActiveConnection = objConn
strSQL1 = "SELECT FirstName FROM contactinfo WHERE empID = '" & strIDNum &"'"
rsSecurity.open strSQL1, objConn
if (rsSecurity.RecordCount = 1) then
%>
<TD ALIGN="LEFT" VALIGN="MIDDLE"><INPUT TYPE="Submit" NAME="Submit" VALUE="Submit"></td>
<TD ALIGN="LEFT" VALIGN="MIDDLE" WIDTH="25"> </td>
<TD ALIGN="LEFT"><INPUT TYPE="text" NAME="companyname" VALUE="" SIZE="20" MAXLENGTH="150"></td>
<TD ALIGN="LEFT"><INPUT TYPE="text" NAME="phonenumber" VALUE="" SIZE="15" MAXLENGTH="15"></td>
<TD ALIGN="LEFT"><INPUT TYPE="text" NAME="email" VALUE="" SIZE="35" MAXLENGTH="35"></td>
</tr>
<tr>
<td> </td>
</tr>
<%
end if
%>
Currently, the html code is being hidden either way and the resultset.recordcount is returning -1.
Thanks in advance for the help.
Jeremy
|
Follow Up - The Right Cursor - J. Paul Schmidt 5/16/2001 2:59:09 AM
Follow Up - Re: Hiding HTML Code using VBScript within and ASP - rad 6/12/2001 5:00:12 AM
|
|

|
|
|
|
|
|
|
|
|
|