Installation
- add reference to Omu.AwesomeMvc.dll
- in _Layout.cshtml / Site.master add AwesomeMvc.js and AwesomeMvc.css (also add jquery.js, jquery-ui.js, jquery-ui.css)
example:
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/start/jquery-ui.css" rel="stylesheet" />
<link href="@Url.Content("~/Content/themes/start/AwesomeMvc.css")" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
<script src="@Url.Content("~/Scripts/AwesomeMvc.js")" type="text/javascript"></script>
MVC 4
For MVC 4 you need to make sure you have the below in your web.config (you might have it already):
<configuration>
...
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
...
</configuration>
Optional (recommended)
for razor views (cshtml) add this in \Views\web.config:
<system.web.webPages.razor>
...
<pages>
<namespaces>
...
<add namespace="Omu.AwesomeMvc" />
</namespaces>
</pages>
</system.web.webPages.razor>
for web-forms views (aspx/ascx) add this in main web.config:
<system.web>
...
<pages>
<namespaces>
...
<add namespace="Omu.AwesomeMvc"/>
</namespaces>
</pages>
</system.web>