开发者

Changing the path of the Telerik MVC stylesheets and javascripts

开发者 https://www.devze.com 2023-03-25 08:37 出处:网络
I am using the latest version of Telerik MVC with my ASP.NET MVC 3 application.I took what was in contents and put it into another directory under:

I am using the latest version of Telerik MVC with my ASP.NET MVC 3 application. I took what was in contents and put it into another directory under:

root -> Assets -> telerikaspnetmvc68803

I don't know where to specify that the path has changed because it is still looking for the controls under ~/Content/...

Do I need to add my stylesheets like this? Can I just add them like I would normally add them?

@(Html.Telerik().StyleSheetRegistrar()
   .DefaultGroup(group => group
      .Add("telerik.common.min.css")
      .Add("telerik.webblue.min.css")
      //.Combined(true)
      .Compress(true)))

I normally just add it like this:

If I were to register my javascripts like this then it adds a reference to a jquery file. I don't want this reference to be added because I have a newer version that I want to use. How do I get it开发者_JAVA技巧 to use the newer version?

@(Html.Telerik().ScriptRegistrar()
   .DefaultGroup(group => group
      .Add("telerik.common.min.js")
      .Add("telerik.treeview.min.js")
      .Compress(true)))

Please help :)


Try this:

@(Html.Telerik().StyleSheetRegistrar()
   .DefaultGroup(group => group
            .DefaultPath("~/Assets/telerikaspnetmvc68803")
            .Add("telerik.common.css")
   )
)
0

精彩评论

暂无评论...
验证码 换一张
取 消