Re: Working with Sessions for functions

Tech-Archive recommends: Fix windows errors by optimizing your registry



Chen Leikehmacher wrote:
I have a problem.
I'm having on my site a Session by the name "UserLogon"
which will either have values "true" or "false".
I want to use that information with a function so I will be able to
make an image be visible or not.
However i don't think that it is possible to have asp codes inside
<script>. what should i do?
<%
dim display
if cbool(session("UserLogon")) then
display="inline"
else
display="none"
end if
%>
....
<img style="display:<%=display%>" ...

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


.



Relevant Pages

  • Re: constants in global.asa
    ... memory is allocated to ... Only free-threaded objects should be put in application or session. ... of the object, killing performance. ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.general)
  • Re: ASP performance issues
    ... > everytime, by every script? ... Pages access session variables and application variables. ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.general)
  • Re: Determining URL in Application_OnStart
    ... You don't have to do it "every" time a user starts a session. ... Bob Barrows ... >> Bob Lehmann ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.general)
  • Re: Determining URL in Application_OnStart
    ... You don't have to do it "every" time a user starts a session. ... Bob Barrows ... >> Bob Lehmann ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.iis)