1

For example I have an angular project folder inside of my ASP.NET MVC 4 project folder.

MyAspProjectFolder/App/AngularFolder/dist/index.html

When I redirect from action to this file, by using

return Redirect(Url.Content("App/angularproj/dist/index.html"));

in open the html file, but paths inside this html file understand wrong. For example, in this HTML file I have a link to script

<script type="text/javascript" src="polyfills.bundle.js">

ASP trying to get it relative from localhost, for example

http://localhost:53131/polyfills.bundle.js 

But It not places in localhost, it's under

App/angularproj/dist/polyfills.bundle.js

Is it possible to say ASP, that when I do some route ( for example App/angularproj/ ) it means everything under this route also relative from this route.

Grigor Aleksanyan
  • 540
  • 1
  • 6
  • 19

1 Answers1

0

Check this link

Try using @Url.Content("~/path/file.htm") Or

@Url.Action("ActionName", "ControllerName", new { variable = value })
MCoder
  • 113
  • 5