Script Helper

Good ol’ Glavy boy has posted a ScriptHelper for MVC and WebForms here.

“For example, in the page you can do

<%= ScriptHelper.RequiresScript(ScriptName.jqueryValidateUnobtrusive) %>Or

<%= ScriptHelper.RequiresScript(“jQuery-validate-unobtrusive”) %>

And you would get

<script type='text/javascript' src='/Scripts/jquery-1.4.1.js'></script>
<script type='text/javascript' src='/Scripts/jquery.validate.js'></script>
<script type='text/javascript' src='/Scripts/jquery.validate.unobtrusive.js'>

The library is currently hosted on bitbucket here http://bitbucket.org/glav/mvc-script-dependency-extension. Thanks Glavvy boy.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s