Link to home
Start Free TrialLog in
Avatar of Aleks
AleksFlag 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.
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

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

Cd&
Avatar of 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 ?
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&
Avatar of 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
Avatar of Aleks
Aleks
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
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&
Avatar of Aleks

ASKER

No code was added by community I found it online and want to share it.