473,624 Members | 2,223 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How To: Always Redirect to the Home Page

How can I always redirect any user to the "home" page?

Basically, a user could enter a full URL in the address bar or bookmark a
specific page so that they can go directly to that page. However, my
requirement is that every user accessing the ASP.NET 2.0 (C#) application
must always start at the "home" or "start" page. Thus, I need to redirect
to the "home" page if a user tries to go directly to some other page.
Jan 26 '06 #1
1 2213
When the homepage loads populate a Session variable. Look for the value of
the variable in each subsequent page. If the variable is empty the homepage
was never loaded. Then redirect.
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee. com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
"steggun" <no****@company .com> wrote in message
news:e8******** ******@tk2msftn gp13.phx.gbl...
How can I always redirect any user to the "home" page?

Basically, a user could enter a full URL in the address bar or bookmark a
specific page so that they can go directly to that page. However, my
requirement is that every user accessing the ASP.NET 2.0 (C#) application
must always start at the "home" or "start" page. Thus, I need to redirect
to the "home" page if a user tries to go directly to some other page.

Jan 26 '06 #2

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

Similar topics

1
8000
by: Damo | last post by:
Could someone please help me. I am a newbie at PHP. I downloaded formail.php Version 5.0 from Jacks scripts( http://www.dtheatre.com/scripts/ )and changed the required areas to my email address and the domain server address. (these changes were in the $recipient and $referers section) I have set up the form and can get the form to email me the results. I have two main problems. The first one is that I am trying to get the form to go to a...
3
6535
by: Sean Berry | last post by:
Hi there. I am relativly new to Python CGI and need a question answered. I have made custom 404 error pages and have them in various web directories. I have not been able to figure out a way to have apache use a file not within it's own home directory, so I was going to have a .py file in cgi-bin forward the user on to the correct error page.
3
3971
by: shank | last post by:
I have the following code to redirect users to http://www.mydomain.com/new/default.asp if they use the URL www.newstuff.com (sample). I have that domain name parked on www.mydomain.com. I'm getting the follwing error... Response object error 'ASP 0156 : 80004005' Header Error /Default.asp, line 21 <--- this is my home page The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before...
0
2026
by: Andy Todd | last post by:
Hi We have just moved an ASP.NET application into the live environment which is as follows: Sun Proxy Server / Firewall Windows 2000 Server / IIS5 The URL for the site maps to the Sun proxy box. This translates the request and maps it to the Win2K server which responds through the proxy. The Win2K
1
2523
by: Andy Todd | last post by:
Hi We have just moved an ASP.NET application into the live environment which is as follows: Sun Proxy Server / Firewall Windows 2000 Server / IIS5 The URL for the site maps to the Sun proxy box. This translates the request and maps it to the Win2K server which responds through the proxy. The Win2K
5
2024
by: Alan Silver | last post by:
Hello, I have a page that is supposed to do some checking, and if OK, set a session variable before redirecting to another page. The following code is a simplified version, I have hard-coded the basket ID and removed a load of extra checking... public partial class GoToCheckout : Page { public void Page_Load(Object o, EventArgs e) { try {
2
4116
by: Sergej Prokoviev | last post by:
We are running our site at www.waynesavings.com on secure hosting (Server 2003, IIS). We are using a custom 403.4 error page (called 403_4.asp, located under root) to redirect all users to https if they come in on http. The site is also using an instant refresh on the index.htm page under root to www.waynesavings.com/aboutus/home.htm due to issues with the javascript menus used on the site. The code we're using on the custom 403 page is...
0
1902
by: omer013 | last post by:
Hi; I have an aspx page with a WebMethod to redirect the user to another page. The Default.aspx.cs is; public partial class _Default : System.Web.UI.Page { public static void redirect_user() { HttpContext.Current.Response.Redirect("home.aspx"); }
18
2660
by: Paul Lautman | last post by:
JRough wrote: What do you mean by "redirect the output to Excel"??? Excel isn't a location, it's a spreadsheet program that some (but not all users) will have on their machine. BTW, Location: is supposed to take a fully qualified URL.
0
8624
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
8336
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,...
0
7164
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6111
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
5565
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
4082
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
4176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1786
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1485
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.