Exemplo n.º 1
0
 /// <summary>
 /// Requires the client resources used in the view.
 /// </summary>
 private void RequireClientResources()
 {
     // jQuery.UI is used in autocomplete example.
     // Add jQuery.UI files to existing client resource bundles or load it from CDN or use any other alternative library.
     // We use local resources for demo purposes without Internet connection.
     requiredClientResourceList.RequireStyle(virtualPathResolver.ToAbsolute("~/Static/css/jquery-ui.css"));
     requiredClientResourceList.RequireScript(virtualPathResolver.ToAbsolute("~/Static/js/jquery-ui.js")).AtFooter();
 }
Exemplo n.º 2
0
 public GroupRoute(string directoryPath, RouteCollection childRoutes, IVirtualPathResolver virtualPathResolver)
 {
     if (!directoryPath.StartsWith("~/"))
     {
         throw new ArgumentException("Directory Path must start with '~/'", "directoryPath");
     }
     _virtualPathResolver = virtualPathResolver ?? VirtualPathResolver.Instance;
     VirtualPath = directoryPath;
     _path = _virtualPathResolver.ToAbsolute(VirtualPath);
     ChildRoutes = childRoutes;
 }
Exemplo n.º 3
0
 public GroupRoute(string directoryPath, RouteCollection childRoutes, IVirtualPathResolver virtualPathResolver)
 {
     if (!directoryPath.StartsWith("~/"))
     {
         throw new ArgumentException("Directory Path must start with '~/'", "directoryPath");
     }
     _virtualPathResolver = virtualPathResolver ?? VirtualPathResolver.Instance;
     VirtualPath          = directoryPath;
     _path       = _virtualPathResolver.ToAbsolute(VirtualPath);
     ChildRoutes = childRoutes;
 }
 private void RequireClientResources()
 {
     requiredClientResourceList.RequireScript(virtualPathResolver.ToAbsolute("~/Static/js/jquery-ui.js")).AtFooter();
 }