Link to home
Start Free TrialLog in
Avatar of net_susan
net_susan

asked on

When is End If not necessary?

I have the following code that works without the end if statements. Why does it work without it, and should I have it in anyway? It's in the middle of a different loop.

If rstemp("SomeNumber")="1" then Response.write "Some Message 1"
If rstemp("SomeNumber")="2" then Response.write "Some Message 2"
If rstemp("SomeNumber")="3" then Response.write "Some Message 3"
If rstemp("SomeNumber")="4" then Response.write "Some Message 3"
If rstemp("SomeNumber")="5" then Response.write "Some Message 5"
ASKER CERTIFIED SOLUTION
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oops! I wrote:

If something then : 'your code ; end if

Instead of:

If something then : 'your code : end if

>>Fritz is the all knowing oracle<<

Hardly! Many people don't know this, but I learned ASP here. My first question?  https://www.experts-exchange.com/questions/10752001/ASP-Access-Connection.html


;-)

FtB
Avatar of net_susan
net_susan

ASKER

Thanks!  And wow, Fritz, that's nice to know you started here.
You have to start somewhere!

Good luck and always use end if!

FtB