473,406 Members | 2,281 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,406 software developers and data experts.

Navigating back to the previous webpage

Hello!

I'm trying to figure out how to go back to the previous webpage without
using the code below since the directory structure is hardcoded. It should
work just like clicking the "Back" button on Internet Explorer.

private void Button5_Click(object sender, System.EventArgs e)
{
Response.Redirect("http://localhost/Directory1/Form1.aspx");
}
Nov 16 '05 #1
2 2889
Luckily, from the client's perspective, you cannot access the client history
directly from the server side. To navigate the client's history you must
use a client side script along the lines of:

<script language=javascript>
function goBack() {
window.history.go(-1);
}
</script>

HTH

DalePres
MCAD, MCDBA, MCSE

"Newbie" <Ne****@discussions.microsoft.com> wrote in message
news:48**********************************@microsof t.com...
Hello!

I'm trying to figure out how to go back to the previous webpage without
using the code below since the directory structure is hardcoded. It should
work just like clicking the "Back" button on Internet Explorer.

private void Button5_Click(object sender, System.EventArgs e)
{
Response.Redirect("http://localhost/Directory1/Form1.aspx");
}

Nov 16 '05 #2
Perhaps storing the user's last few URLs (on your website) in their session
state?

"Newbie" <Ne****@discussions.microsoft.com> wrote in message
news:48**********************************@microsof t.com...
Hello!

I'm trying to figure out how to go back to the previous webpage without
using the code below since the directory structure is hardcoded. It should
work just like clicking the "Back" button on Internet Explorer.

private void Button5_Click(object sender, System.EventArgs e)
{
Response.Redirect("http://localhost/Directory1/Form1.aspx");
}

Nov 16 '05 #3

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

Similar topics

3
by: John Spiegel | last post by:
Hi all, I think this is a longshot, but is there a technique for programmatically run a webpage? Let's say one of our vendors has a page that we go to daily to pick up some files. Each time,...
0
by: Jesper Lauridsen | last post by:
I am developing an ASP.NET application for a Questionnaire that spans over several pages. The entire Questionnaire code resides in one ASPX page. When a user submits a questionnaire page by...
2
by: Chad A. Beckner | last post by:
Hey all, I have a ASP .NET webpage which contains several panels. When I click a button on the first "panel" page, it postsback to the same page, and I switch the visibility of the panels...
3
by: Greg Krzeszkowski | last post by:
Hi, This might be a little odd but I need to implement a back/"return to previous page" function from different pages within my asp.net application. The page the back button on has a property...
5
by: Roy Lawson | last post by:
I am having no problems connecting to a DB, creating a DataAdapter, and creating a dataset...and connecting to the data. Using the builtin data objects to do all this. My only problem now is...
1
by: sympatico | last post by:
Hi, We are working on a .NET application. In our project, most of the interfaces use frames. We have a problem accessing previous page using frames. Let us say we have a page A that does not...
0
by: ffrugone | last post by:
I am making a webpage. On it I have a couple of dropdownlists that work in conjunction. I have them autopostback, and I check for conflicts within the SelectedIndexChanged event handler. By...
1
by: JohnMOsborn | last post by:
I am designing an Access database that will use tab controls. Normally, you place different sets of fields on each page of the tab control – like Fields1-3 on Page 1, Fields 4-6 on Page 2, etc. In...
0
by: Anthony Peterson | last post by:
I'm trying to find a solution for my webpage which uses a Datagrid of all editable rows for a spreadsheet sort of style. The tab key works great in navigating across this datagrid, but I would like...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.