Later findings: it looks like some time ago there weren't html helper extension methods for that. Are you sure you have something like that?
Question reference: shield ui chart: generate series dynamically? (where op is saying that he wrote a custom html helper for .net mvc)
Html helpers reference: http://www.tutorialsteacher.com/mvc/html-helpers
Are you sure you have html helpers in Shield.Web.UI
namespace? (see this question too: Referencing the Shield UI ASP.NET MVC javascript modules)
1st approach
You can create a bundle with those two javascript files for now.
Open the App_Start\BundleConfig.cs
, there you will have a RegisterBundles
method where you can create a bundle with those two files.
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jqueryand")
.Include("~/Scripts/jquery-3.1.1.js"))
.Include("~/Scripts/shieldui.js");
// i don't know exactly the name of the library
}
And in your Global.asax.cs
, you need to register this bundle:
In Application_Start method, add the following line:
BundleConfig.RegisterBundles(BundleTable.Bundles);
Then in your _Layout
or your more specific view, you'll have to add @Scripts.Render("~/bundles/jquery")
More about this approach here: https://www.asp.net/mvc/overview/performance/bundling-and-minification
And here:
How do I add BundleConfig.cs to my project? (probably this question is very useful)
2nd approach
Use something like RequireJs for .NET, which will bring some features to your application, but will also add some complexity.
See my answer for the question below:
RequireJS - ASP.NET MVC Bundle Script
About this part of your problem:
but I still cant access them via @(Html.XXXX).
Maybe your intellisense is broken, you can give it a try after you add the script to the page/layout and after you make sure that you have
@using Shield.Web.UI
for your page/layout.