473,387 Members | 1,504 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.

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 5011
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. Response.Redirect...
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 Redirect command? Or does it ever continue to...
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 specified.. IE: newpage.asp?id=JobID
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 pages, each page contains a common .ascx. This ascx...
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 string. 3. Redirect to some other page Here...
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 cancel the redirect and resume flow after the...
10
by: Niggy | last post by:
I get an error - any help appreciated. System.Threading.ThreadAbortException: Thread was being aborted. at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object...
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) provided at the university I work for. Each page checks...
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 requests by bassing the ASPSESSIONID cookie through the...
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 another page (which is abcd.asp, in this case)....
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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...
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...
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,...

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.