Simple if...else asp/html question

Simple if...else asp/html question

am 26.04.2007 13:11:45 von lawrence.hunt

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

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

am 26.04.2007 13:46:26 von Anthony Jones

"Lawrence" wrote in message
news:1177585905.342121.278400@r30g2000prh.googlegroups.com.. .
> 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
%>

<%
Else
%>

<%
End If
%>

JScript:-

<%
if (booleanExpression)
{
%>

<%
}
else
{
%>

<%
}
%>

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

am 26.04.2007 20:31:20 von lawrence.hunt

On Apr 26, 12:46 pm, "Anthony Jones" wrote:
> "Lawrence" wrote in message
>
> news:1177585905.342121.278400@r30g2000prh.googlegroups.com.. .
>
>
>
> > 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
> %>
>
> <%
> Else
> %>
>
> <%
> End If
> %>
>
> JScript:-
>
> <%
> if (booleanExpression)
> {
> %>
>
> <%}
>
> else
> {
> %>
>
> <%}
>
> %>

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