Avatar of Aleks
Aleks
Flag for United States of America asked on

Display region if session exists

On page # 1 I set a session variable =1

--
<%
Session("Qnrtype") = ("1");
%>
--

On page two i have to regions, I want to display the top one of the session doesn't exist (gets there through a different page), and want to display region two if session exists.

---


If session doesnt exist

<region 1>

If session exists

<region2>

I just need help with the syntax please.
Web DevelopmentHTML

Avatar of undefined
Last Comment
Aleks

8/22/2022 - Mon
COBOLdinosaur

I think we need to see some actual code.  It is not clear what you are doing.

Cd&
Aleks

ASKER
I set this session in prev page:

<%
Session("Qnrtype") = ("1");
%>

next page there is no existing code at the moment.

IF session Qnrtype <> NULL

DISPLAY THIS ROW

END

If session Qnrtype = NULL

DISPLAY THIS ROW

END

Something like that ?
COBOLdinosaur

When you generate you test the session and either generate only the one region based on the session, or you generate both and give at regions a style=display:block or style=display:none to display or hide specific regions.

Cd&
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Aleks

ASKER
No, I am thinking more in terms of:

                <%
if Session("Qnrtype") == "1";
%>

MY CODE

                <%
if Session("Qnrtype")  IS NULL;
%>

MY CODE 1
ASKER CERTIFIED SOLUTION
Aleks

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
COBOLdinosaur

If you are looking for the specific asp code to generate the page, you probably should have posted in the asp topic.  You can use the Request Attention link to ask Community Support to add that topic to the Q.

Cd&
Aleks

ASKER
No code was added by community I found it online and want to share it.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.