By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,033 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,033 IT Pros & Developers. It's quick & easy.

response.redirect

P: n/a
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
Share this Question
Share on Google+
17 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a

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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a

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

P: n/a
> 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 discussion thread is closed

Replies have been disabled for this discussion.