Connecting Tech Pros Worldwide Help | Site Map

Simple if...else asp/html question

Lawrence
Guest
 
Posts: n/a
#1: Apr 26 '07
Hi

I have only begun to look into ASP due to an assignments requirements
(I usually code in PHP), one feature in PHP is to be able to do an
if...else statement, where if a certain statement is true then a chunk
of HTML can be outputted...

Basically I want to be able to do this in ASP to use with a simple
authentication system which I will construct.

I have just got a fat book on ASP, and am beginning to read through it
etc

Regards

Lawrence

Anthony Jones
Guest
 
Posts: n/a
#2: Apr 26 '07

re: Simple if...else asp/html question



"Lawrence" <lawrence.hunt@gmail.comwrote in message
news:1177585905.342121.278400@r30g2000prh.googlegr oups.com...
Quote:
Hi
>
I have only begun to look into ASP due to an assignments requirements
(I usually code in PHP), one feature in PHP is to be able to do an
if...else statement, where if a certain statement is true then a chunk
of HTML can be outputted...
>
Basically I want to be able to do this in ASP to use with a simple
authentication system which I will construct.
>
I have just got a fat book on ASP, and am beginning to read through it
etc
>
Regards
>
Lawrence
>
Which language are you using in the ASP page?

vbscript:-

<%
If BooleanExpression Then
%>
<!-- HTML Content here -->
<%
Else
%>
<!-- Alternative HTML Content here -->
<%
End If
%>

JScript:-

<%
if (booleanExpression)
{
%>
<!-- HTML Content here -->
<%
}
else
{
%>
<!-- Alternative HTML Content here -->
<%
}
%>



Lawrence
Guest
 
Posts: n/a
#3: Apr 26 '07

re: Simple if...else asp/html question


On Apr 26, 12:46 pm, "Anthony Jones" <A...@yadayadayada.comwrote:
Quote:
"Lawrence" <lawrence.h...@gmail.comwrote in message
>
news:1177585905.342121.278400@r30g2000prh.googlegr oups.com...
>
>
>
Quote:
Hi
>
Quote:
I have only begun to look into ASP due to an assignments requirements
(I usually code in PHP), one feature in PHP is to be able to do an
if...else statement, where if a certain statement is true then a chunk
of HTML can be outputted...
>
Quote:
Basically I want to be able to do this in ASP to use with a simple
authentication system which I will construct.
>
Quote:
I have just got a fat book on ASP, and am beginning to read through it
etc
>
Quote:
Regards
>
Quote:
Lawrence
>
Which language are you using in the ASP page?
>
vbscript:-
>
<%
If BooleanExpression Then
%>
<!-- HTML Content here -->
<%
Else
%>
<!-- Alternative HTML Content here -->
<%
End If
%>
>
JScript:-
>
<%
if (booleanExpression)
{
%>
<!-- HTML Content here -->
<%}
>
else
{
%>
<!-- Alternative HTML Content here -->
<%}
>
%>
Ok thanks, gonna use VBScript I think, looks quite similar to the way
I would do it in PHP which is reassuring and also stupid of me for not
trying it in the first place ^_^

Many thanks

Lawrence

Closed Thread