0

i am having an asp.net web site and in that in the app_Code folder I have created a folder call Areas and Created CommonEOS Area and added the MVC controller,views and models to it.

In the controller I get the error cannot resolve index for the view

How To solve this. The controller code is

Function About() As ActionResult
 Return View() //<== I get cannot resolve here.
End Function

2 Answers 2

1

You can try with this approach for the views locator:

A Custom View Engine with Dynamic View Location

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

Comments

0

You should have your views in the Views folder if you to follow MVC conventions. You can also create an Area, but you should follow the conventions for creating Areas (registering, etc) or take advantage of the tooling to create new areas.

If you don't want to follow convention, you must explicitly tell MVC where to find the view.

2 Comments

My folder structure is like this - inside App_code Area/CommonEOS/Controllers Is there any way to register the Area Folder I have code to regiester commonEos
In the q you said that you created the Area in the app_code folder. That's not standard

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.