Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
4
Reply
How to redirect to a action method when a file not found
Abolfazl
Oct 28 2016 7:13 AM
280
Reply
Hi
I have a action method in a controller and call a html file from this action method.
my controller name is
Admin
and my action method is
ShowAdminDashboard
.
when I request
Admin/ShowAdminDashboard
everything is ok, but when I call a html file from this method, for example
login.html
, the url changes to
Admin/login.html
and I face with 404 error page.
I understand it looks on
ApplicationPath/Admin/login.html
but can't find Admin folder and login.html.
I want to redirect to a specific method instead of showing 404 error page in this situation.in addition I want to redirect just for Admin controller.
I try overriding
HandleUnknownAction
for Admin controller but it doesn't work.
can you help me?
thanks
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
ASP.NET MVC Logical Question
change data base column data type id is 'int' to string