1

I am trying to use static html partial viewd from the asp.net mvc views folder in angularjs, but it doesn't seem to work. Is it possible at all or I must create a new folder for these? Ideally I would like to keep all views in the same folder.

1 Answer 1

1

You can get access to the static files in Views folder by changing web.config setting to this.

<add name="BlockViewHandler" path="*.cshtml" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />

You need to change path="*" to path="*.cshtml", this will allow all other file types to be allowed directly.

I answered this question in bit more detail here, https://stackoverflow.com/a/24789089/3421839

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.