No. Not impossible. I do exactly that. Code snippet from a recent project below. What seems to be the problem?
Note that StyleSheet
and Javascript
are my own extension methods, as is the DatedContent
extension on UrlHelper. To get your own extension methods to work you'll need to import the namespace containing them at the top of your page.
<%@ Import Namespace="MvcExtensions" %>
<%= Html.StyleSheet( Url.DatedContent( "~/Content/styles/themes/jquery-ui-theme.css" ) )%>
<%= Html.StyleSheet( Url.DatedContent( "~/Content/styles/Site.css" ), "all" ) %>
<%= Html.Javascript( Url.Content( "~/Scripts/jquery-1.3.2.min.js" ) ) %>
<%= Html.Javascript( Url.Content( "~/Scripts/ui/ui-all-1.7.1.min.js" ) ) %>