navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Free FrontPage Templates

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Different include page for logged in users?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Different include page for logged in users?
Page: [1]
 
teimky

 

Posts: 77
Joined: 11/6/2006
Status: offline

 
Different include page for logged in users? - 8/20/2007 12:33:49   
Hi all,

I'd like to display a slightly different home page on my site depending on whether someone is logged in or not.
The way I thought of doing this was to call 1 of 2 different include pages.

Ive got this ASP code to check if someone is logged in but the lines that add the include pages arnt working. I guess this is because they dont like being inside <% %> for the asp statement.....

<% if session("UserName")&""="" then

<!-- #include file="XInclude_out.asp" -->

else
<!-- #include file="XInclude_in.asp" -->
end if
%>



Is there a way of getting this to work or am I going about it the wrong way??:)

Many thanks,

Mark.
ou812

 

Posts: 1603
Joined: 1/5/2002
From: San Diego
Status: offline

 
RE: Different include page for logged in users? - 8/20/2007 13:10:46   
You're correct, includes shouldn't be in the ASP code itself. Just close out your ASP and reopen after the includes. Something like this:
<% if session("UserName")&""="" then
%>
<!-- #include file="XInclude_out.asp" -->
<%
else
%>
<!-- #include file="XInclude_in.asp" -->
<%
end if
%> 


_____________________________

-brian

EnterpriseDB: Enterprise-class relational database management system
PostgreSQL: The world's most advanced open source database

(in reply to teimky)
teimky

 

Posts: 77
Joined: 11/6/2006
Status: offline

 
RE: Different include page for logged in users? - 8/20/2007 13:17:54   
As simple as that!

Knowing you can do that will help in other parts of my site too.

Thanks! :)




(in reply to ou812)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Different include page for logged in users?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts