Click here to Skip to main content
12,694,691 members (32,599 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# VB ASP.NET VB.NET
Hi,

I have 3 asp.net pages HomePage.aspx, Page1.aspx & Page2.aspx.

Page1.aspx and Page2.aspx has a link through which I can go to HomePage.aspx.

My Question is:
In HomePage.aspx, how can I check a condition if the page has been opened from Page2.aspx or Page3.aspx?

I am not supposed to use querystring.

Please Help !!!
Posted 9-Nov-12 2:16am
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

ok can use of session object fo example use of one session object that
initialize when user in page1 or page2 click on a button or link to go to home page.
in page1:
 session["PageName"]="Page1";

in page2:
 session["PageName"]="page2";

and in home page forexample ,you can do this:
 if(session["PageName"].Tostring()=="page1")
   //do somthing
 else if(session["PageName"].Tostring()=="page2")
   //do somthing
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

use javascript

function geturl()
{

var parenturl= window.opener.location.href
}
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 9 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100