472,353 Members | 1,526 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

response.redirect

I'm using VB.NET 2003.

I can send a user back one page with this command:
Response.Redirect(Request.ServerVariables("HTTP_RE FERER").

Is there a simple way to send him back two pages?

Thanks,

Dave
Nov 21 '05 #1
17 4951
Dan
"Dave" <da*****************************@stic.net> wrote in message
news:eR**************@TK2MSFTNGP14.phx.gbl...
I'm using VB.NET 2003.

I can send a user back one page with this command:
Response.Redirect(Request.ServerVariables("HTTP_RE FERER").

Is there a simple way to send him back two pages?


Use javascript:

Response.Write "<script language=javascript> history.back(-2); </script>"

HTH
Nov 21 '05 #2
The server doesn't know about anything further back than the page you just
came from. You need client-side code (as provided in the other reply)
because only the browser knows its own history.
"Dave" <da*****************************@stic.net> wrote in message
news:eR**************@TK2MSFTNGP14.phx.gbl...
I'm using VB.NET 2003.

I can send a user back one page with this command:
Response.Redirect(Request.ServerVariables("HTTP_RE FERER").

Is there a simple way to send him back two pages?

Thanks,

Dave

Nov 21 '05 #3
Yes, sir, I like that!

Thanks.

Dave
"Dan" <daniel_c_hate_spam@NoSpam_myrealbox.com> wrote in message
news:ug*************@TK2MSFTNGP10.phx.gbl...
"Dave" <da*****************************@stic.net> wrote in message
news:eR**************@TK2MSFTNGP14.phx.gbl...
I'm using VB.NET 2003.

I can send a user back one page with this command:
Response.Redirect(Request.ServerVariables("HTTP_RE FERER").

Is there a simple way to send him back two pages?


Use javascript:

Response.Write "<script language=javascript> history.back(-2); </script>"

HTH

Nov 21 '05 #4
"Dan" <daniel_c_hate_spam@NoSpam_myrealbox.com> schrieb:
I'm using VB.NET 2003.

I can send a user back one page with this command:
Response.Redirect(Request.ServerVariables("HTTP_RE FERER").

Is there a simple way to send him back two pages?


Use javascript:

Response.Write "<script language=javascript> history.back(-2); </script>"


.... which won't work if JavaScript is disabled on the client.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #5
Herfried,
Use javascript:

Response.Write "<script language=javascript> history.back(-2); </script>"


... which won't work if JavaScript is disabled on the client.

Than probably nothing will work with ASPX. An aspx page is completly build
around JavaScript.(In standard setting, it can AFAIK also be VBScript,
however that I never tried)

:-)

Cor
Nov 21 '05 #6
Scott,
The server doesn't know about anything further back than the page you just
came from. You need client-side code (as provided in the other reply)
because only the browser knows its own history.


The server knows only what it has in his session.items, cache or shared
classes (the last two shared for all active clients from the application).
There is no page information at all on the server.

Cor
Nov 21 '05 #7
Uh, no it's not. It is terribly inaccurate to say that ASP.NET is
"completely built around JavaScript". There is nothing in the architecture
that is JavaScript based.

JavaScript is used by the validation controls and some of the page
properties, but you can certainly work with ASP.NET and have the bulk of its
functionality available with scripting turned off.
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Herfried,
Use javascript:

Response.Write "<script language=javascript> history.back(-2);
</script>"


... which won't work if JavaScript is disabled on the client.

Than probably nothing will work with ASPX. An aspx page is completly build
around JavaScript.(In standard setting, it can AFAIK also be VBScript,
however that I never tried)

:-)

Cor

Nov 21 '05 #8
Cor, you are incorrect. The HTTPRequest object exposes the ServerVariables
collection which contains environmental information about both the client
and the server and includes the current document's referring page.
"Cor Ligthert" <no************@planet.nl> wrote in message
news:ej**************@TK2MSFTNGP10.phx.gbl...
Scott,
The server doesn't know about anything further back than the page you
just came from. You need client-side code (as provided in the other
reply) because only the browser knows its own history.


The server knows only what it has in his session.items, cache or shared
classes (the last two shared for all active clients from the application).
There is no page information at all on the server.

Cor

Nov 21 '05 #9

This is turning into a nice discussion :-)

But i think it all mathers on how you code cause my websites for instance
know more about the client as should be possible refering the below
statements
How ??? well a nice SQL server does the trick.....

Regarding the Javascript ???? Oh God I wish it was pure Javascript 1.2 that
Microsoft uses in ASP.Net controls
well surprise !!!! it isn`t Javascript it is Jscript ( Microsoft`s own
implementation )

How do i know that ?? well my biggest web project until so far (
http://www.tireponline.de ) is made for one of our customers who needed a
platform independent website ( Windows \ Linux )
well i got the Job and i know now why other software company`s smiled and
said goodbye :-) .

Cause i really had to reinvent the weel for a lot of standard functionality
because it did not work on Mozilla \ Conqueror

While i prooved that it is good possible to make a true platform independent
website ,,,, however it requires some thorough knowledge of javascript

M. Posseth [MCP Developer]


"Scott M." <s-***@nospam.nospam> wrote in message
news:eY**************@TK2MSFTNGP14.phx.gbl...
Cor, you are incorrect. The HTTPRequest object exposes the ServerVariables collection which contains environmental information about both the client
and the server and includes the current document's referring page.
"Cor Ligthert" <no************@planet.nl> wrote in message
news:ej**************@TK2MSFTNGP10.phx.gbl...
Scott,
The server doesn't know about anything further back than the page you
just came from. You need client-side code (as provided in the other
reply) because only the browser knows its own history.


The server knows only what it has in his session.items, cache or shared
classes (the last two shared for all active clients from the application). There is no page information at all on the server.

Cor


Nov 21 '05 #10
Michael,

Are you sure of that, when I open a generated ASPX page, than I only see on
the pages JavaScript, I was already much longer suprised that that was not
JScript.

What statements are it in particular that are JScript?

Cor
Nov 21 '05 #11
Scott,
Cor, you are incorrect. The HTTPRequest object exposes the
ServerVariables collection which contains environmental information about
both the client and the server and includes the current document's
referring page.

You are correct I should have added, "when there is from the session no page
active on the server.

However I added it to your page and was refering to your part. "The server
doesn't know about anything further back than the page you just came from."

When it is not that situation (there is no page active from the session)
than starts my part of the message.
"The server knows only what it has in his session.items, cache or shared
classes"

I agree that you can read it in another way.

Cor
Nov 21 '05 #12
If you take a look at the .js files that are used by ASP.NET (ie.
C:\Inetpub\wwwroot\aspnet_client\system_web\1_1_43 22_0\WebUIValidation.js),
you will see that JScript elements are used throughout them (ie.
document.all).
"Cor Ligthert" <no************@planet.nl> wrote in message
news:ej**************@TK2MSFTNGP14.phx.gbl...
Michael,

Are you sure of that, when I open a generated ASPX page, than I only see
on the pages JavaScript, I was already much longer suprised that that was
not JScript.

What statements are it in particular that are JScript?

Cor

Nov 21 '05 #13
Scott,

It can be that Michael means that with his message, I saw that document.all
is compatible with ECMA 262.

I suppose that it probably works on 99% of all browsers.
(However it is as written JScript. I was more thinking on not cmpatible
parts).

When the client is today still thinking about Netscape on Apple, than he
probably has been frozen in and is just awaked.

Just my thougt,

Cor
Nov 21 '05 #14
document.all is NOT defined in ECMA-262, it is proprietary to Microsoft's
JScript, which is why a most simple JavaScript browser detection scripts for
MSIE use:

if(document.all)
{
// browser is IE
}
else if(document.layers)
{
//browser is NS
}

I think what you saw was that JScript's document.all is compatible with
ECMA-262 in the sense that ECMA Script has:

document.getElementsByTagName("*")

which does the same thing as document.all.

As for Netscape, it isn't just for Apple machines, it can be used on Windows
as well. There are quite a bit of Netscape users out there and so, for
publicly facing sites, we must accommodate them.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:uw**************@TK2MSFTNGP14.phx.gbl...
Scott,

It can be that Michael means that with his message, I saw that
document.all is compatible with ECMA 262.

I suppose that it probably works on 99% of all browsers.
(However it is as written JScript. I was more thinking on not cmpatible
parts).

When the client is today still thinking about Netscape on Apple, than he
probably has been frozen in and is just awaked.

Just my thougt,

Cor

Nov 21 '05 #15
To follow up on this, the object "document" is not part of ECMA-262 at all,
nor is it part of the DOM. Many people confuse the Browser's Object Model
(BOM) with the Document Object Model (DOM).

Objects like window, document, location, history, screen, etc. are NOT
defined in the ECMA Script language. They are object models that are
specific to a particular company's browser. When you use a Microsoft
Internet Explorer proprietary browser object or a proprietary property or
method of a browser object, you are using JScript since JavaScript wouldn't
know anything about Microsoft objects.

For example, while both Netscape and Microsoft provide a "document" object
in each of their Browser Object Models (BOM), they are not the same
"document" object. Microsoft's exposes an "all" property and Netscape's
doesn't. However, Netscape provides a "layers' property and Microsoft
doesn't. So, if you use "document.layers" in your code, you are using
JavaScript, if you use "document.all" in your code, you are using JScript
and if you steer clear of all proprietary objects, properties, methods &
events, you are using ECMA Script (ECMA-262).
"Cor Ligthert" <no************@planet.nl> wrote in message
news:uw**************@TK2MSFTNGP14.phx.gbl...
Scott,

It can be that Michael means that with his message, I saw that
document.all is compatible with ECMA 262.

I suppose that it probably works on 99% of all browsers.
(However it is as written JScript. I was more thinking on not cmpatible
parts).

When the client is today still thinking about Netscape on Apple, than he
probably has been frozen in and is just awaked.

Just my thougt,

Cor

Nov 21 '05 #16

Fact is that i had lots of problems with Firefox , Mozilla browsers however
when i used strict Javascript 1.2 standards
i noticed that without having to write any exclusions for IE or Mozilla it
worked in Both browsers flawless ( IE does support the official standards
however there are lots of shortcuts availlable in IE that do not work in
other browsers )

I have Both browsers installed on my system and i had a Suse Linux test
machine for this project well it turned out that i could not use most of the
fancy out of the box ASP.Net controls
i had to write all client side code myself ..

Michel



"Scott M." <s-***@nospam.nospam> wrote in message
news:u$**************@TK2MSFTNGP10.phx.gbl...
If you take a look at the .js files that are used by ASP.NET (ie.
C:\Inetpub\wwwroot\aspnet_client\system_web\1_1_43 22_0\WebUIValidation.js), you will see that JScript elements are used throughout them (ie.
document.all).
"Cor Ligthert" <no************@planet.nl> wrote in message
news:ej**************@TK2MSFTNGP14.phx.gbl...
Michael,

Are you sure of that, when I open a generated ASPX page, than I only see
on the pages JavaScript, I was already much longer suprised that that was not JScript.

What statements are it in particular that are JScript?

Cor


Nov 21 '05 #17
> I have Both browsers installed on my system and i had a Suse Linux test
machine for this project well it turned out that i could not use most of
the
fancy out of the box ASP.Net controls
i had to write all client side code myself ..

Michel


Right, because the .js files that "drive" the ASP.NET Web Form controls that
use JavaScript (ie. all the validation controls) contain JScript and not
JavaScript.
Nov 21 '05 #18

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

Similar topics

3
by: Paul | last post by:
I'm not getting the results I want when I use Response.Redirct in a ASP page. I enter this line of code in a asp page from domain1.com. ...
4
by: JC | last post by:
Hi, I have a simple question regarding the Response.Redirect method. Does the server stop processing the ASP code as soon as it encounters the...
4
by: TomT | last post by:
Hi.. I'm redirecting users to another page using: response.redirect("newpage.asp") this works... But I need to add a variable to the page...
6
by: Sam | last post by:
I have some issues with HTTP Headers and I was hoping for some pointers or references to good articles. Here is the problem. I have 6 .aspx...
3
by: Sehboo | last post by:
On my ASP page, when I click a button, I want to do three things: 1. Check for some values. 2. Open a new window and pass some values as query...
13
by: Tim | last post by:
Hello, Is there a way to "cancel" a response.Redirect? For example, in the code below, could I insert anything in the Catch statement that would...
10
by: Niggy | last post by:
I get an error - any help appreciated. System.Threading.ThreadAbortException: Thread was being aborted. at...
5
by: venner | last post by:
I'm having an issue with an ASP.NET website after upgrading to ASP.NET 2.0. The website makes use of a central authentication service (CAS)...
4
by: mike.biang | last post by:
I have an ASP page that is using an XMLHTTP object to request various pages from my server. I keep a single session throughout the XMLHTTP...
9
by: RN1 | last post by:
When a server encounters the line Response.Redirect("abcd.asp") in a ASP script, the server tells the browser that it has to be redirected to...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.