473,385 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

finding previous page

Hi,

I have a question regarding page navigation. See i have a page called
page1.aspx and page2.aspx. On some event in the both the pages the page
get transfered to page3.aspx using Server.Transfer method.
One i i hit the update button in the page3, i want to go back to the
previous page which can be either page1 or page2.

How do i transfer back to previous page?
venky

Nov 19 '05 #1
3 1886
I am not sure about this. But, worth a try..

Would Request["HTTP_REFERER"] help?
Raj

"venky" <ve************@yahoo.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
Hi,

I have a question regarding page navigation. See i have a page called
page1.aspx and page2.aspx. On some event in the both the pages the page
get transfered to page3.aspx using Server.Transfer method.
One i i hit the update button in the page3, i want to go back to the
previous page which can be either page1 or page2.

How do i transfer back to previous page?
venky

Nov 19 '05 #2
If you're using Server.Transfer you don't have an explicit way to get the
previous page. You can use the HttpContext.Items collection to implicitly
pass data to the second page (including a reference to the previous page):

// page1:
void ButtonClick()
{
Context.Items["PreviousPage"] = this;
Server.Transfer("Page2");
}

// page2:
void Page_Load()
{
page1_aspx prev = (page1_aspx)Context.Items["PreviousPage"];
prev.GetSomeStuff();
}

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

I have a question regarding page navigation. See i have a page called
page1.aspx and page2.aspx. On some event in the both the pages the
page get transfered to page3.aspx using Server.Transfer method.

One i i hit the update button in the page3, i want to go back to the
previous page which can be either page1 or page2.

How do i transfer back to previous page?

venky


Nov 19 '05 #3
Hi Venkat,
There is no direct way to go back the previous page..
You can go back to the page A(which has called the page B) by using
Querystring or again use the Server.Transfer method...

To know which page has called the Page B, save the information in the
Session.

If there are too many variables to pass / confidential information then
Querystring might not be a good idea...

HTH,

Happy Coding

"venky" <ve************@yahoo.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
Hi,

I have a question regarding page navigation. See i have a page called
page1.aspx and page2.aspx. On some event in the both the pages the page
get transfered to page3.aspx using Server.Transfer method.
One i i hit the update button in the page3, i want to go back to the
previous page which can be either page1 or page2.

How do i transfer back to previous page?
venky

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sims | last post by:
Hi, If i have an html page and i am looking for the <style ... > tag. What would be the best way to look for it? I need to look for a special type, something like <script...
3
by: Marcel | last post by:
Hello, I'm working on a search application for my website. The website contains a lot of pictures, and a search should return clickable thumbnails. No problems there. My problem started when I...
2
by: TadPole | last post by:
Hi all, My main problems are::::::::: 1. Set a value within a block container that can be used and changed by subsequent templates/block-containers/tables etc.. 2. get/determine/find the...
2
by: B Moor | last post by:
I have a database with 100,000's records, each with a unique reference, eg A123BNK456 I would like to generate a search facility whereby we can choose an exact match or partial match, where the...
5
by: Terry Olsen | last post by:
Is there a good way to find a pattern of bytes/chars in a stream? I've got a serial port connected to a tcp port. I need to be able to catch a unique character string in the stream so that I can...
4
by: jrett | last post by:
I'm new to ASP.NET and fairly inexperienced with web development in general, but I've been a professional software dev for over 10 years, C++, Unix and windows, C# the past 4 years. I've been...
1
by: Jeff | last post by:
I need to place a "Previous Page" link on every page within my site and a simple javascript:history.back() will not work because I need it to capture the state of the page when I left it. For...
1
by: Franky | last post by:
I am creating a training tutorial with a number of pages. when the users logs in or registers, they start a session, which is used on each page to ensure they are a valid user, etc. However, when...
13
by: staeri | last post by:
I use javascript:history.go(-1) to return to the previous page. I've now found out that when returning to the previous page all selections that the user made in dropdownlists are lost. How can...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.