Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# 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 1: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
0 OriginalGriff 389
1 Sergey Alexandrovich Kryukov 362
2 CPallini 130
3 Abdul Samad KP 125
4 Richard MacCutchan 110
0 OriginalGriff 6,249
1 Sergey Alexandrovich Kryukov 5,680
2 CPallini 4,850
3 George Jonsson 3,454
4 Gihan Liyanage 2,522


Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 9 Nov 2012
Copyright © CodeProject, 1999-2014
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