C
craigkenisston
Hi,
I'm going nuts with a supposed simple thing.
I have this page :
<%@ Page language="c#" Codebehind="404page.aspx.cs"
AutoEventWireup="false" Inherits="mydomain._404page" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Web.SessionState" %>
<html>
<script language="C#" runat="server">
void Page_Load(Object sender, EventArgs e) {
Response.Redirect("~/default.aspx");
}
</script>
<head>
<title>404page</title>
<meta name="CODE_LANGUAGE" Content="C#">
</head>
<body>
</body>
</html>
All what I want is to redirect any error to the root.
I already added : <error statusCode="404" redirect="404page.aspx" /> to
the web.config.
The problem is, when a page is mistyped, I am sending to the error
page, but the error page is not redirecting to the root as it should !
What's the problem ?
Thanks in advance.
I'm going nuts with a supposed simple thing.
I have this page :
<%@ Page language="c#" Codebehind="404page.aspx.cs"
AutoEventWireup="false" Inherits="mydomain._404page" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Web.SessionState" %>
<html>
<script language="C#" runat="server">
void Page_Load(Object sender, EventArgs e) {
Response.Redirect("~/default.aspx");
}
</script>
<head>
<title>404page</title>
<meta name="CODE_LANGUAGE" Content="C#">
</head>
<body>
</body>
</html>
All what I want is to redirect any error to the root.
I already added : <error statusCode="404" redirect="404page.aspx" /> to
the web.config.
The problem is, when a page is mistyped, I am sending to the error
page, but the error page is not redirecting to the root as it should !
What's the problem ?
Thanks in advance.