Solved

Display region if session exists

Posted on 2013-01-08
7
370 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
How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

707 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