- Add Reference to DNA.Mvc.jQuery.dll
- Copy the Content and Scripts folder to your MVC website
For Mvc 3 (Razor)
1.Add DJME2 namespaces in *~/Views/web.config* like below:
<system.web.webpages.razor>
...
<pages>
<namespaces>
...
<add namespace="DNA.Mvc">add>
<add namespace="DNA.Mvc.jQuery">add>
namespaces>
pages>
system.web.webpages.razor>
2.Add css links and script links in
~/Views/Shared/_Layout.cshtml header tag
<link href="@Url.Content("~/Content/themes/default/jquery-ui.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/themes/default/dna.ui.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript">script>
3.Add script render method on the bottom of the
~/Views/Shared/_Layout.cshtml
...
<body>
()
@Html.RenderScripts()
body>
...
For Mvc2/3 Asp.NET Form
1.Add DJME 2 namespaces in
~/web.config like below:
<system.web>
...
<pages>
<namespaces>
...
<add namespace="DNA.Mvc" >add>
<add namespace="DNA.Mvc.jQuery" >add>
namespaces>
pages>
system.web>
2.Add css links and script links in
~/Views/Shared/Site.Master head tag
<link href="<%:Url.Content("~/Content/themes/default/jquery-ui.css") %>" rel="stylesheet" type="text/css" />
<link href="<%:Url.Content("~/Content/themes/default/dna.ui.css") %>" rel="stylesheet" type="text/css" />
<script src="<%:Url.Content("~/Scripts/jquery-1.4.4.min.js") %>" type="text/javascript">script>
3.Add script render method on the bottom of the
~/Views/Shared/Site.Master
...
<body>
....
<%=Html.RenderScripts() %>
body>
html>