NetTalk Central

Author Topic: Returning something like "Page not found"  (Read 2912 times)

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Returning something like "Page not found"
« on: January 18, 2012, 12:07:49 AM »
Hi,

I have a page with the name "Call" that acts like a web service. The first parameter is "name" which is the function name it should call and all subsequent parameters are specific to the function that is called.

When the Call page is called and the function name is unknown, I would like to return a similar response that NT gives in the case where a page is not found (404). Where in the WebHandler can I do this?

Thys

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Returning something like "Page not found"
« Reply #1 on: January 18, 2012, 12:49:56 AM »
Are you asking how to override the 404 error?
In all cases, or just this case?

Check out example "ErrorPage (32)" for some ideas on overriding the error page returned.

cheers
Bruce

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Re: Returning something like "Page not found"
« Reply #2 on: January 18, 2012, 01:00:30 AM »
Bruce,

It's just the opposite of what you are asking. I want to produce error 404 even though the page exists.

Thys