|
| |
|
|
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
|
|
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
|
|
|