What's the namespace of AJAX DNA?
http://www.dotnetage开发者_开发技巧.com/sites/home/djme-2-demo.html
The dna keep appearing with red squiggly line, what's the namespace of the following MVC library?
@{
Ajax.Dna().TreeView("Tree1")
.ShowCheckboxs(true)
.Items(items =>
{
items.Add("Accordion", "#", Url.Content("~/webshared/home/images/dj_icons/icon_accordion.gif"))
.Items(subItems =>
The home page seems pretty self explanatory and more specifically the Installation section.
For Razor
1.Add DJME2 namespaces in ~/Views/web.config like below:
<system.web.webPages.razor>
...
<pages>
<namespaces>
...
<add namespace="DNA.Mvc" />
<add namespace="DNA.Mvc.jQuery" />
</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>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.9.custom.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.tmpl.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.farbtastic.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/djme-2.min.js")" type="text/javascript"></script>
3.Add script render method on the bottom of the *~/Views/Shared/_Layout.cshtml*
...
<body>
@RenderBody()
@Html.RenderScripts()
</body>
...
For ASP.NET MVC 2
1.Add DJME 2 namespaces in ~/web.config like below:
<system.web>
...
<pages>
<namespaces>
...
<add namespace="DNA.Mvc" />
<add namespace="DNA.Mvc.jQuery" />
</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>
<script src="<%:Url.Content("~/Scripts/jquery-ui-1.8.9.custom.min.js") %>" type="text/javascript"></script>
<script src="<%:Url.Content("~/Scripts/jquery.tmpl.min.js") %>" type="text/javascript"></script>
<script src="<%:Url.Content("~/Scripts/jquery.farbtastic.js") %>" type="text/javascript"></script>
<script src="<%:Url.Content("~/Scripts/djme-2.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>
精彩评论