1

I need to ignore routes matching this schema

/{controller}/edit/undefined

{controller} - could be any controller

BTW I was wondering when to use Ignore and when IgnoreRoute.

2
  • Who is sending such requests? A poorly coded javascript? Why do you need to ignore them? Why not fixing your code and stop sending such requests in the first place? Commented Jun 20, 2012 at 7:52
  • undefined is ...? any? js undefined value? Commented Jun 20, 2012 at 7:53

1 Answer 1

2

You could add the following at the beginning of your route definitions:

routes.IgnoreRoute("{controller}/edit/undefined");

BTW I was wondering when to use Ignore and when IgnoreRoute.

It's the same thing. IgnoreRoute is an extension method that does the same as Ignore.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.