473,387 Members | 1,540 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,387 software developers and data experts.

Question about capturing previous page

Hi,
I have a legacy ASP page, in which I have following pieces of JavaScript
to run in order to sending values to a new ASPX page
......
action = "NewVersion/Bridge.aspx";
method='get';
submit();
......

In the new Bridge.aspx, I need to detect which privous page sends out the
request, so I have following codes in my ASPX code behind
Uri refUrl = Request.UrlReferrer;
Trace.Write(refUrl.AbsolutePath);

But system will throw an exception "NullReferenceException: Object reference
not set to an instance of an object." on second line. It looks like ASPX is
unable to detect its previous page if previous one uses form to sends
request.

Any clue how to obtain previous page?

Thanks!

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy
Nov 18 '05 #1
2 1625
Context.Handler

Eliyahu

"Hardy Wang" <ha********@marketrend.com> wrote in message
news:Oa**************@TK2MSFTNGP09.phx.gbl...
Hi,
I have a legacy ASP page, in which I have following pieces of JavaScript to run in order to sending values to a new ASPX page
.....
action = "NewVersion/Bridge.aspx";
method='get';
submit();
.....

In the new Bridge.aspx, I need to detect which privous page sends out the
request, so I have following codes in my ASPX code behind
Uri refUrl = Request.UrlReferrer;
Trace.Write(refUrl.AbsolutePath);

But system will throw an exception "NullReferenceException: Object reference not set to an instance of an object." on second line. It looks like ASPX is unable to detect its previous page if previous one uses form to sends
request.

Any clue how to obtain previous page?

Thanks!

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy

Nov 18 '05 #2
"Hardy Wang" <ha********@marketrend.com> wrote in message
news:Oa**************@TK2MSFTNGP09.phx.gbl...
Hi,
I have a legacy ASP page, in which I have following pieces of JavaScript to run in order to sending values to a new ASPX page
.....
action = "NewVersion/Bridge.aspx";
method='get';
submit();
.....

In the new Bridge.aspx, I need to detect which privous page sends out the
request, so I have following codes in my ASPX code behind
Uri refUrl = Request.UrlReferrer;
Trace.Write(refUrl.AbsolutePath);

But system will throw an exception "NullReferenceException: Object reference not set to an instance of an object." on second line. It looks like ASPX is unable to detect its previous page if previous one uses form to sends
request.

Any clue how to obtain previous page?


UrlReferrer will be null if there is no Referrer header in the request.
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #3

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

Similar topics

3
by: Online | last post by:
Hello, This code: <?php preg_replace_callback("/(a)|(b)/", create_function('$x', 'foreach ($x as $y => $z)'. 'echo "\\\$y: $z<br>";'), "b");
4
by: Aliza Klein | last post by:
I am new to ASP so please pardon me if this is crazy. I have data that I want to allow the user to be able to save in a format that will then enable the user to open the data in Excel. (I have...
6
by: Robert Nurse | last post by:
Hi, Is it at all possible to capture and suppress the backspace key when focus is not on a form edit control? Basically, while the page is loading I don't want the user pressing the backspace...
2
by: Hardy Wang | last post by:
Hi, I have a legacy ASP page, in which I have following pieces of JavaScript to run in order to sending values to a new ASPX page ...... action = "NewVersion/Bridge.aspx"; method='get';...
1
by: williamroy | last post by:
Hello, I've got a form that runs over 5 pages. I need the last page submit button to post all of the answers at one time from the previous 5 pages (to another server). I'd like to see the last...
6
by: Ed Leafe | last post by:
I've been approached by a local business that has been advised that they need to start capturing and archiving their instant messaging in order to comply with Sarbanes-Oxley. The company is largely...
7
by: SteveM | last post by:
I am sure this is an easy question, but being relatively new to ASP.NET programming, I can not quite grasp what I need to accomplish what I need to do. What I have is a word document that is...
2
by: GS | last post by:
How can one avoid capturing leading empty or blank lines? the data I deal with look like this "will be paid on the dates you specified. xyz supplier amount: $100.52 when: September 07,...
2
by: jordilin | last post by:
Is there any way to capture the keyboard events ESC, page up (next page), page down (previous page) in Python?. I mean, how can I capture if user presses one of those keys in a terminal based...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.