London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Though content is exist I want to show this content (Page) not found for certain condition if this content brows from URL

Vote:
0

Hi,

Can anyone help to do the below job

Though content is exist  I want to show this  content (Page) not found for certain condition if this content brows from URL.

Thanks

Sourav

#175017
Feb 09, 2017 14:17
Vote:
0

Hi,

In your controller you can throw a 404 error:

if (true)
{
    throw new HttpNotFoundException();
}
#175045
Feb 09, 2017 20:26
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.