473,796 Members | 2,464 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Go back where I came from

When user Clicks on the Close button on the main form I would like to go back where the user came from. If my form is the first page since IE was opened I would like to go to the specific website. Is that possible?

Thanks

Peter

Nov 19 '05 #1
6 1465
To determine if there is history exists ,Checkout Request.UrlRefe rrer

code would be like ,

if (Request.UrlRef errer == null )
//add javascript to the close button to navigate to "specific page"
else
//add javascript to the close button to do history.go(-1);
"Peter" wrote:
When user Clicks on the Close button on the main form I would like to go back where the user came from. If my form is the first page since IE was opened I would like to go to the specific website. Is that possible?

Thanks

Peter

Nov 19 '05 #2
What version of ASP.NET are you using?
The answer Sreejith tried to give is incorrect.
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee. com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
"Peter" <pc*****@online .nospam> wrote in message news:O6******** ******@tk2msftn gp13.phx.gbl...
When user Clicks on the Close button on the main form I would like to go back where the user came from. If my form is the first page since IE was opened I would like to go to the specific website. Is that possible?

Thanks

Peter

Nov 19 '05 #3
I am using .NET 1.1
"clintonG" <cs*********@RE MOVETHISTEXTmet romilwaukee.com > wrote in message news:ug******** ******@tk2msftn gp13.phx.gbl...
What version of ASP.NET are you using?
The answer Sreejith tried to give is incorrect.
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee. com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
"Peter" <pc*****@online .nospam> wrote in message news:O6******** ******@tk2msftn gp13.phx.gbl...
When user Clicks on the Close button on the main form I would like to go back where the user came from. If my form is the first page since IE was opened I would like to go to the specific website. Is that possible?

Thanks

Peter

Nov 19 '05 #4
I'm sorry, I see I failed to explain why I thought Sreejith was wrong.
Do you want to go back only one page or back to the homepage of the website?

<%= Clinton Gallagher

"Peter" <pc*****@online .nospam> wrote in message news:uz******** ******@TK2MSFTN GP14.phx.gbl...
I am using .NET 1.1
"clintonG" <cs*********@RE MOVETHISTEXTmet romilwaukee.com > wrote in message news:ug******** ******@tk2msftn gp13.phx.gbl...
What version of ASP.NET are you using?
The answer Sreejith tried to give is incorrect.
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee. com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
"Peter" <pc*****@online .nospam> wrote in message news:O6******** ******@tk2msftn gp13.phx.gbl...
When user Clicks on the Close button on the main form I would like to go back where the user came from. If my form is the first page since IE was opened I would like to go to the specific website. Is that possible?

Thanks

Peter

Nov 19 '05 #5
One page.
"clintonG" <cs*********@RE MOVETHISTEXTmet romilwaukee.com > wrote in message news:OT******** ******@TK2MSFTN GP15.phx.gbl...
I'm sorry, I see I failed to explain why I thought Sreejith was wrong.
Do you want to go back only one page or back to the homepage of the website?

<%= Clinton Gallagher

"Peter" <pc*****@online .nospam> wrote in message news:uz******** ******@TK2MSFTN GP14.phx.gbl...
I am using .NET 1.1
"clintonG" <cs*********@RE MOVETHISTEXTmet romilwaukee.com > wrote in message news:ug******** ******@tk2msftn gp13.phx.gbl...
What version of ASP.NET are you using?
The answer Sreejith tried to give is incorrect.
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee. com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
"Peter" <pc*****@online .nospam> wrote in message news:O6******** ******@tk2msftn gp13.phx.gbl...
When user Clicks on the Close button on the main form I would like to go back where the user came from. If my form is the first page since IE was opened I would like to go to the specific website. Is that possible?

Thanks

Peter

Nov 19 '05 #6
Sorry for the interrupting.

Hi Peter,

I think the Request.UrlRefe rer or javascript window.history. go(-1) all
make sense. However, Request.UrlRefe rer will contains the original page's
location (it's a standard http header ..), however, this is not always set
by the cilent browser. And as for window.history. go(-1) , this script will
make the clientside browser go back one steps from the browser's history
list(just like when we hit the "back" button on browser...). The problem
of history.go(-1) is that when we have performed some post back on the
form, the postback version of the page will also be added into the history
list , so go(-1) one steps may not meet the requirements. So if there is
postback on the page, we may have to record this , (make a post back count
stored in viewstate...) and so that we can put the count in the history.go(
-count) as parameter...

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Peter" <pc*****@online .nospam>
| References: <O6************ **@tk2msftngp13 .phx.gbl>
<ug************ **@tk2msftngp13 .phx.gbl>
<uz************ **@TK2MSFTNGP14 .phx.gbl>
<OT************ **@TK2MSFTNGP15 .phx.gbl>
| Subject: Re: Go back where I came from
| Date: Sun, 13 Nov 2005 22:43:25 -0600
| Lines: 151
| MIME-Version: 1.0
| Content-Type: multipart/alternative;
| boundary="----=_NextPart_000_ 000E_01C5E8A3.A 8CEDE10"
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <OO************ **@tk2msftngp13 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: cpe-69-23-74-9.new.res.rr.co m 69.23.74.9
| Path:
TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GXA01.phx.gbl!T K2MSFTFEED02.ph x.gbl!tornado.f a
stwebnet.it!tis cali!newsfeed1. ip.tiscali.net! newsfeed00.sul. t-online.de!t-on
line.de!TK2MSFT NGP08.phx.gbl!t k2msftngp13.phx .gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3578 28
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| One page.
| "clintonG" <cs*********@RE MOVETHISTEXTmet romilwaukee.com > wrote in
message news:OT******** ******@TK2MSFTN GP15.phx.gbl...
| I'm sorry, I see I failed to explain why I thought Sreejith was wrong.
| Do you want to go back only one page or back to the homepage of the
website?
| <%= Clinton Gallagher
| "Peter" <pc*****@online .nospam> wrote in message
news:uz******** ******@TK2MSFTN GP14.phx.gbl...
| I am using .NET 1.1
| "clintonG" <cs*********@RE MOVETHISTEXTmet romilwaukee.com > wrote in
message news:ug******** ******@tk2msftn gp13.phx.gbl...
| What version of ASP.NET are you using?
| The answer Sreejith tried to give is incorrect.
| <%= Clinton Gallagher
| METROmilwaukee (sm) "A Regional Information Service"
| NET csgallagher AT metromilwaukee. com
| URL http://metromilwaukee.com/
| URL http://clintongallagher.metromilwaukee.com/
| "Peter" <pc*****@online .nospam> wrote in message
news:O6******** ******@tk2msftn gp13.phx.gbl...
| When user Clicks on the Close button on the main form I would
like to go back where the user came from. If my form is the first page
since IE was opened I would like to go to the specific website. Is that
possible?
| Thanks
| Peter
|

Nov 19 '05 #7

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

Similar topics

2
3058
by: lawrence | last post by:
I've been bad about documentation so far but I'm going to try to be better. I've mostly worked alone so I'm the only one, so far, who's suffered from my bad habits. But I'd like other programmers to have an easier time understanding what I do. Therefore this weekend I'm going to spend 3 days just writing comments. Before I do it, I thought I'd ask other programmers what information they find useful. Below is a typical class I've...
25
7594
by: KK | last post by:
Hi, I am using history.go(-1) for implementing the back button functionality. Its working fine but with this exception. 1. The page which is having back button has some hyperlinks on it. 2. When anybody click on those links, it will open a new windown.
3
1699
by: icb | last post by:
Hi I have a front-end/back-end setup. The front-end utilises all unbound forms populating the back-end via the code I have written. All fine so far. Prior to splitting the database I ran the security wizard and used a shortcut from the desktop. All fine except of course I can open the back-end directly. The security FAQ appears to be out of date insofar as there is no wrkgadm.exe with 2002 and therefore you simply run the security...
1
4286
by: Peter D. Dunlap | last post by:
Hello, I realize that this may not be the best place to ask this question, through the application is asp.net. I also realize that questions about disabling the back button are generally met with derision, so let me explain: (1) The site is actually a web-based application, not a "web site" per say, and is not accessable by the public. It is an application used internally by the company I work for, though it accessed by employees
8
2585
by: Galina | last post by:
Hello I have 6 dependent list boxes on my ASP page:  Faculty;  Lecturer;  Course;  Course occurrence;  Group;  Week commencing date. When faculty is selected, lists of lecturers and courses are populated. When course is selected, lists of occurrences, groups and
6
10697
by: Mark | last post by:
I have two dropdown lists. Both have autopostback set to true. In both dropdowns, when you select an item from the list, it redirects to the Value property of the dropdown. Nothing fancy. Let's say you select 1 of the items, and are properly redirected. You press the back button. I have three servers providing two different functionalities: 1. After pressing the back button, the item you selected in the dropdown is still selected.
29
4079
by: Tom wilson | last post by:
I can't believe this is such an impossibility... I have an asp.net page. It accepts data through on form fields and includes a submit button. The page loads up and you fill out some stuff. The submit button posts the page back to the server. The button code detects an entry error and sends the page back to the user. This all works. However, if the user presses the Back button at this point, we go back and all the form values are...
5
6263
by: The alMIGHTY N | last post by:
Hi all, Let's say I have a simple math formula: sum (x * y / 1000) / (sum z / 1000) I have to do this across 50 items, each with an x, y and z value, when the page first loads AND when a user modifies any of the x, y and z values.
3
2707
by: Tom | last post by:
Basically I have a page that I load with 10 input fields. If users have JS enabled I want to hide 5 of these fields so as to reduce clutter. If the user needs these extra fields an "Add" button can be used to display the hidden fields one by one. Once the fields a filled in the user submits them for validation and if there are any error They can "Go back" to make some changes. The whole process works great in FF & Opera but IE lets me...
22
2806
by: Rickster66 | last post by:
As Instructed this is a new thread regarding my original post: "Select Only 10 Columns Going Back" I'm sorry for the late response. I've been gathering up information and carefully with as much detail as possible, making clear and straiforward for you. I need to create 3 new queries based on the queries that you wrote. Each query has a numerical value and a textual value. The new queries are based on the queries with a numerical value. I...
0
10230
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10174
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7548
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6788
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5442
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5575
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.