“/”应用程序中的服务器错误。
行 9: .Add("telerik." + Html.GetCurrentTheme() + ".css")
参考文章:
http://www.telerik.com/community/forums/aspnet-mvc/grid/problem-in-applying-css.aspx
http://www.telerik.com/community/forums/aspnet-mvc/grid/system-web-mvc-htmlhelper-lt-dynamic-gt-does-not-contain-a-definition-for-getcurrenttheme.aspx
添加一个静态class
GetCurrentTheme should be a stand alone extension (static class)
public static class ThemeExtender
{
public static string GetCurrentTheme(this HtmlHelper html)
{
return html.ViewContext.HttpContext.Request.QueryString["theme"] ?? "vista";
}
}
don't forget to add the namespace in the view