Why this simple asp code don't work?

Stalker

Member
Oct 9, 1999
193
0
0
<%
dim name
name = Replace(Request.Form("Account_No"), " ", "")
If(name <> "") Then
=(Recordset1_total)
else
=(Recordset2_total)
End If
%>

I have tried using response.write("=(Recordset1_total)") instead of =(Recordset1_total) but fail.
Code below work but it is harder to read

<%
dim name
name = Replace(Request.Form("Account_No"), " ", "")
If(name <> "") Then%>
<%=(Recordset1_total)%>
<%else%>
<%=(Recordset2_total)%>
<%End If
%>
 

AFB

Lifer
Jan 10, 2004
10,718
3
0
Originally posted by: Stalker
<%
dim name
name = Replace(Request.Form("Account_No"), " ", "")
If(name <> "") Then
=(Recordset1_total)
else
=(Recordset2_total)
End If
%>

I have tried using response.write("=(Recordset1_total)") instead of =(Recordset1_total) but fail.
Code below work but it is harder to read

<%
dim name
name = Replace(Request.Form("Account_No"), " ", "")
If(name <> "") Then%>
<%=(Recordset1_total)%>
<%else%>
<%=(Recordset2_total)%>
<%End If
%>

Just guessing, but try this.