I have an MVC application. After I finished the web site I need to change @url.content behavior.
So I need to override @url.content in all of my website application. How can I do it?
<script src="@Url.Content("~/Scripts/jquery-1.7.1.js")"></script>
<script src="@Url.Content("~/Scripts/ui/jquery.ui.core.js")"></script>
<script src="@Url.Content("~/Scripts/ui/jquery.ui.widget.js")"></script>
<script src="@Url.Content("~/Scripts/ui/jquery.ui.tabs.js")"></script>
<script src="@Url.Content("~/Scripts/ui/jquery.ui.accordion.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.nivo.slider.js")"></script>
<script src="@Url.Content("~/Scripts/jwplayer.js")"></script>
MHF,
As mentioned in my comments above, i ‘feel’ you should create a bespoke html.image() helper, rather than try to override the url.content() helper, given that your problem is related to images, and not url.content() per se. here’s how i’d approach this:
useage:
Now, the above is purely a ‘lift’ from an old mvc project, with a comment added to give a hint as to what you might do. I haven’t tested this in any way, so caveat emptor 🙂
good luck