Solved

Display region if session exists

Posted on 2013-01-08
7
369 Views
Last Modified: 2013-01-13
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.
0
Comment
Question by:amucinobluedot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 38755414
I think we need to see some actual code.  It is not clear what you are doing.

Cd&
0
 

Author Comment

by:amucinobluedot
ID: 38755514
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 ?
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 38755723
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&
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:amucinobluedot
ID: 38755860
No, I am thinking more in terms of:

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

MY CODE

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

MY CODE 1
0
 

Accepted Solution

by:
amucinobluedot earned 0 total points
ID: 38755871
Or is it like this ?

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

 <% }  %>


<% if Session("Qnrtype") == NULL { %>

 <% }  %>
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 38755941
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&
0
 

Author Closing Comment

by:amucinobluedot
ID: 38771607
No code was added by community I found it online and want to share it.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
email validation 9 49
Navigation Menu Does Not Show on iPad 4 32
Table doesn't show the lines! 3 24
Need advice on an App idea......but who do I ask? 2 28
Find out what you should include to make the best professional email signature for your organization.
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question