473,386 Members | 1,828 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,386 software developers and data experts.

controlling redirection within frames

I have a question about how best to implement a redirection to a
framed version of a web site. Basically I have a web site that was
originally implemented without frames. Then it was decided that it
needed frame, so I made a page called index.aspx that contained the
frameset that initially displayed the original home page, home.aspx,
in one of the frames.

However that meant that the user had to go to
http://some_stuff/index.aspx instead of http://some_stuff/home.aspx
which was bad for various reasons (mostly because people are used to
home.aspx being the home page).

So we decided to make the home.aspx page redirect immediately to the
index.aspx page like this:

private void Page_Load(object sender, System.EventArgs e)
{
Response.Redirect("/some_stuff/index.aspx");
}

However, this resulted in infinite redirections. So to stop it from
redirecting to the home.aspx page after the first time, I decided to
do something like this:

private void Page_Load(object sender, System.EventArgs e)
{
if(Session["beenHome"] == null)
{
Session["beenHome"] = "dummy";
Response.Redirect("/some_stuff/index.aspx");
}
}

This works pretty well for the most part except that if after getting
to the home page (with the frames displaying correctly), the user
manually retypes the url to be http://some_stuff/home.aspx they will
get the page without the frames.

I understand why things work the way they do, but I'm just wondering
if there's a better way to do this (i.e. one without the flaw I
mentioned).

Thanks,
Dave
Nov 17 '05 #1
0 1092

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

Similar topics

7
by: David Hayes | last post by:
I tried finding an answer on http://www.quirksmode.org/ without success. I am attempting a complicated Frames structure. I have made it work in IE, but not Netscape. I begin with three...
52
by: Gerard M Foley | last post by:
Can one write a webpage which is not displayed but which simply redirects the user to another page without any action by the user? Sorry if this is simple, but I am sometimes simple myself. ...
6
by: Paulers | last post by:
Hello, I am trying to manipulate a console based application from another application for example I need to launch the console application, provide it input and take the output from the console...
33
by: rvj | last post by:
if you redirect on an IIS , must the client url address bar always be updated with the new address. what options are? Q1 if a user requests http://old.com , is there a method of ASP...
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...
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?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.