Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspdotnet_website_programming thread: custom error page


Message #1 by "Todd Mueller" <lenny_92675@y...> on Tue, 12 Nov 2002 18:01:23
All,

Im trying to implement a custom error page that gets called when an error 
is thrown. I cant seem to get the page to come up. All i get is the error 
message defined from the site.

this is my settings in the web.config file
    <customErrors mode="On" defaultRedirect="errpage.aspx">
		
    </customErrors> 

Any reason why its not pciking this up?

Todd
Message #2 by "Pampin Picasso, Juan Pablo (PAZ)" <pampinjp@i...> on Tue, 12 Nov 2002 14:46:47 -0300
Look at:
PhilePageBase\PhilePage.cs

Try 2 things:
1)
protected override void OnInit(EventArgs e)
		{
			base.OnInit(e);
			this.Load += new
System.EventHandler(this.PhilePage_Load);
		// Comment this line
			/* this.Error += new
System.EventHandler(this.PhilePage_Error);*/
		}
 Or
2)Change 
protected void PhilePage_Error(object sender, System.EventArgs e)
{
  ....
}

to 

protected void PhilePage_Error(object sender, System.EventArgs e)
{
  Response.Redirect["/thephile/errpage.aspx"];
}

-----Mensaje original-----
De: Todd Mueller [mailto:lenny_92675@y...] 
Enviado el: Tuesday,November 12,2002 3:01 PM
Para: Website Programming with ASP.NET
Asunto: [aspdotnet_website_programming] custom error page

All,

Im trying to implement a custom error page that gets called when an error 
is thrown. I cant seem to get the page to come up. All i get is the error 
message defined from the site.

this is my settings in the web.config file
    <customErrors mode="On" defaultRedirect="errpage.aspx">
		
    </customErrors> 

Any reason why its not pciking this up?

Todd
Message #3 by "Pampin Picasso, Juan Pablo (PAZ)" <pampinjp@i...> on Tue, 12 Nov 2002 14:49:29 -0300
Sorry, it's
Response.Redirect("/thephile/errpage.aspx");

-----Mensaje original-----
De: Pampin Picasso, Juan Pablo (PAZ) 
Enviado el: Tuesday,November 12,2002 2:47 PM
Para: 'Website Programming with ASP.NET'
Asunto: RE: [aspdotnet_website_programming] custom error page

Look at:
PhilePageBase\PhilePage.cs

Try 2 things:
1)
protected override void OnInit(EventArgs e)
		{
			base.OnInit(e);
			this.Load += new
System.EventHandler(this.PhilePage_Load);
		// Comment this line
			/* this.Error += new
System.EventHandler(this.PhilePage_Error);*/
		}
 Or
2)Change 
protected void PhilePage_Error(object sender, System.EventArgs e)
{
  ....
}

to 

protected void PhilePage_Error(object sender, System.EventArgs e)
{
  Response.Redirect["/thephile/errpage.aspx"];
}

-----Mensaje original-----
De: Todd Mueller [mailto:lenny_92675@y...] 
Enviado el: Tuesday,November 12,2002 3:01 PM
Para: Website Programming with ASP.NET
Asunto: [aspdotnet_website_programming] custom error page

All,

Im trying to implement a custom error page that gets called when an error 
is thrown. I cant seem to get the page to come up. All i get is the error 
message defined from the site.

this is my settings in the web.config file
    <customErrors mode="On" defaultRedirect="errpage.aspx">
		
    </customErrors> 

Any reason why its not pciking this up?

Todd
Message #4 by "Todd Mueller" <lenny_92675@y...> on Tue, 12 Nov 2002 18:17:51
this is the error i get with #2
Only assignment, call, increment, decrement, and new object expressions 
can be used as a statement

Method 'System.Web.HttpResponse.Redirect(string)' referenced without 
parentheses





Message #5 by "Ken Schaefer" <ken@a...> on Wed, 13 Nov 2002 16:09:04 +1100
Use () instead of [] if you are using VB.Net

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Todd Mueller" <lenny_92675@y...>
Subject: [aspdotnet_website_programming] RE: custom error page


: this is the error i get with #2
: Only assignment, call, increment, decrement, and new object expressions 
: can be used as a statement
: 
: Method 'System.Web.HttpResponse.Redirect(string)' referenced without 
: parentheses
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  Return to Index