Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Custom Error Page


Message #1 by "Mark Phillips" <margia5@h...> on Mon, 14 May 2001 18:11:58
I am working thru the ASP+ Preview book and am currently working with 

custom error pages.  I am trying to translate the VB code to C#.



The book speaks of using the Request.Form.Item notation.  There is no Item 

property for the Form in C#.  OK.  According to the book, the custom error 

page has access to the Errors from the Request.Form.  





I've tried:

 Request.Form.Item("ErrorCode")

 Request.Form("ErrorCode")

 and many, many other variation.



The basic error page will open up if I comment out the Request.Form 

section.  But if I uncomment it, I can't even make it to that page when an 

error occurs.  The code in the book, which uses vb, opens the page fine, 

but no error information appears on the page.  So I am stumped.



Any ideas?



Thanks,

Mark



Message #2 by "Richard Anderson" <rja@a...> on Tue, 22 May 2001 21:12:31 +0100
Have you tried:



 Request.Form["ErrorCode"]



----- Original Message -----

From: "Mark Phillips" <margia5@h...>

To: "ASP+" <aspx@p...>

Sent: Monday, May 14, 2001 6:11 PM

Subject: [aspx] Custom Error Page





> I am working thru the ASP+ Preview book and am currently working with

> custom error pages.  I am trying to translate the VB code to C#.

>

> The book speaks of using the Request.Form.Item notation.  There is no Item

> property for the Form in C#.  OK.  According to the book, the custom error

> page has access to the Errors from the Request.Form.

>

>

> I've tried:

>  Request.Form.Item("ErrorCode")

>  Request.Form("ErrorCode")

>  and many, many other variation.

>

> The basic error page will open up if I comment out the Request.Form

> section.  But if I uncomment it, I can't even make it to that page when an

> error occurs.  The code in the book, which uses vb, opens the page fine,

> but no error information appears on the page.  So I am stumped.

>

> Any ideas?

>

> Thanks,

> Mark

>

>

> ---

> SoftArtisans helps developers build robust, scalable Web applications!

> Excel Web reports, charts: http://www.softartisans.com/excelwriter.html

> File uploads: http://www.softartisans.com/saf.html

> Transactional file management: http://www.softartisans.com/saf1.html

> Scalability: http://www.softartisans.com/saxsession.html

> ASPstudio value pack: http://www.softartisans.com/aspstudiosuite.html




>



Message #3 by "Mark Phillips" <margia5@h...> on Thu, 24 May 2001 18:41:00
Thanks for responding.



Actually, yes I have tried Request.Form["ErrorCode"].  I only placed the 

Request.Form.Item["ErrorCode"] in my first message because it was closer 

to the original book info.



I also contacted WROX errata about this issue.  They indicated that the 

code on page 141 was incorrect.  And placed a correction on the errata 

site. I had already made those adjustments to my code and the code still 

is not working in vb or c#.  



Maybe the custom error page just can't get the error through the Request 

object.  Or maybe it will appear in beta 2. or.. or..



Mark







> Have you tried:

> 

>  Request.Form["ErrorCode"]

> 

> ----- Original Message -----

> From: "Mark Phillips" <margia5@h...>

> To: "ASP+" <aspx@p...>

> Sent: Monday, May 14, 2001 6:11 PM

> Subject: [aspx] Custom Error Page

> 

> 

> > I am working thru the ASP+ Preview book and am currently working with

> > custom error pages.  I am trying to translate the VB code to C#.

> >

> > The book speaks of using the Request.Form.Item notation.  There is no 

Item

> > property for the Form in C#.  OK.  According to the book, the custom 

error

> > page has access to the Errors from the Request.Form.

> >

> >

> > I've tried:

> >  Request.Form.Item("ErrorCode")

> >  Request.Form("ErrorCode")

> >  and many, many other variation.

> >

> > The basic error page will open up if I comment out the Request.Form

> > section.  But if I uncomment it, I can't even make it to that page 

when an

> > error occurs.  The code in the book, which uses vb, opens the page 

fine,

> > but no error information appears on the page.  So I am stumped.

> >

> > Any ideas?

> >

> > Thanks,

> > Mark

> >




  Return to Index