Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Display region if session exists

Posted on 2013-01-08
7
Medium Priority
?
372 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
Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The viewer will learn how to dynamically set the form action using jQuery.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

610 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