This is a migrated thread and some comments may be shown as answers.

[Urgent].Add("telerik." + Html.GetCurrentTheme() + ".css")

0 Answers 88 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kiang
Top achievements
Rank 1
Kiang asked on 18 Apr 2012, 08:32 AM
<!DOCTYPE html>
<html lang="en">
<style type="text/css">
.leftdiv
{
    width: 20% ;
    float: left;
}
</style>
    <head>
        <meta charset="utf-8" />
        <title>@ViewBag.Title - My ASP.NET MVC Application</title>
        <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
        <link href="@Url.Content("~/Content/themes/base/jquery.ui.all.css")" rel="stylesheet" type="text/css" />
        <script src="@Url.Content("~/Scripts/jquery-1.6.2.min.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Scripts/modernizr-2.0.6-development-only.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Scripts/AjaxLogin.js")" type="text/javascript"></script>
        <meta name="viewport" content="width=device-width">
 
 
        @(Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group.DefaultPath("~/Content/Content/")
        .Add("telerik.examples.css")
        .Add("telerik." + Html.GetCurrentTheme() + ".css")
        .Add("telerik.common.css")
        .Add("telerik.rtl.css")
        .Combined(true).Compress(true)))
 
 
    </head>
    <body>
        <header>
            <div class="content-wrapper">
                <div class="float-left">
                    <p class="site-title">@Html.ActionLink("your logo here.", "Index", "Home")</p>
                </div>
                <div class="float-right">
                    <section id="login">
                        @Html.Partial("_LogOnPartial")
                    </section>
                </div>
            </div>
        </header>
        <div id="body">
                    @RenderSection("featured", false)
            <section class="content-wrapper main-content clear-fix">
                @RenderBody()
            </section>
             
        </div>
        <footer>
            <div class="content-wrapper">
                <div class="float-left">
                    <p>© @DateTime.Now.Year - My ASP.NET MVC Application</p>
                </div>
                <div class="float-right">
                    <ul id="social">
                        <li><a href="http://facebook.com" class="facebook">Facebook</a></li>
                        <li><a href="http://twitter.com" class="twitter">Twitter</a></li>
                    </ul>
                </div>
            </div>
        </footer>
        @(Html.Telerik().ScriptRegistrar())
    </body>
</html>


I'm trying to use the CSS of Telerik . But I've got an error like this 

Compiler Error Message: CS1061: 'System.Web.Mvc.HtmlHelper<dynamic>' does not contain a definition for 'GetCurrentTheme' and no extension method 'GetCurrentTheme' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<dynamic>' could be found (are you missing a using directive or an assembly reference?)
 
 
Line 23:         .Add("telerik." + Html.GetCurrentTheme() + ".css")

Can anyone teach me how can i use the CSS?? or teach me how to fix this problem?  thanks [Urgent]
Tags
General Discussions
Asked by
Kiang
Top achievements
Rank 1
Share this question
or