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

[Solved] Telerik Not work for me

0 Answers 12 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.
Chen
Top achievements
Rank 1
Chen asked on 24 May 2013, 09:49 AM
Today I installed Telerik template for VS2010, created a new solution were "C# telerik MVC3 web application" type, and i just want to test menu controls, unfortunately, after i add some code, menu control not work, here are source code, 
<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
 
    <link href="@Url.Content("~/Content/2013.1.219/telerik.common.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/2013.1.219/telerik.vista.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/2013.1.219/telerik.rtl.min.css")" rel="stylesheet" type="text/css" />
   
  <script type="text/javascript" src="@Url.Content("~/Scripts/2013.1.219/jquery-1.7.1.min.js")"></script
  <script type="text/javascript" src="@Url.Content("~/Scripts/2013.1.219/telerik.common.min.js")"></script>
  <script type="text/javascript" src="@Url.Content("~/Scripts/2013.1.219/telerik.menu.min.js")"></script>
   
 
        </head>
<body>
    <div class="page">
        <header>
            <div id="title">
                <h1>My MVC Application</h1>
            </div>
 
            @{Html.Telerik().Menu()
                    .Name("menu")
                    .Items(menu =>
                    {
                        menu.Add().Text("Home").Items(
                            subItem => {
                                subItem.Add().Text("google").Url("http://www.google.com");
                                subItem.Add().Text("MS").Url("http://www.microsoft.com");
                            })
                        .Action("Index", "Home");
                        menu.Add().Text("About").Items(
                            subItem => {
                                subItem.Add().Text("google").Url("http://www.google.com");
                                subItem.Add().Text("MS").Url("http://www.microsoft.com");
                            })
                        .Action("About", "Home");
                    })
                    .Render();
                }
        </header>
        <section id="main">
            @RenderBody()
        </section>
        <footer>
        </footer>
    </div
</body>
</html>


As you guys could be seeing, i just add css, js files reference and two subitems under auto generated code.
after i running the page, there are nothing under root menu, I could see "Home","About" items but i could found subitems.
But when i checked  page source. it could be found it. like this:
<!DOCTYPE html>
<html>
<head>
    <title>Home Page</title>
    <link href="/Content/Site.css" rel="stylesheet" type="text/css" />
 
    <link href="/Content/2013.1.219/telerik.common.min.css" rel="stylesheet" type="text/css" />
    <link href="/Content/2013.1.219/telerik.vista.min.css" rel="stylesheet" type="text/css" />
    <link href="/Content/2013.1.219/telerik.rtl.min.css" rel="stylesheet" type="text/css" />
   
  <script type="text/javascript" src="/Scripts/2013.1.219/jquery-1.7.1.min.js"></script
  <script type="text/javascript" src="/Scripts/2013.1.219/telerik.common.min.js"></script>
  <script type="text/javascript" src="/Scripts/2013.1.219/telerik.menu.min.js"></script>
   
 
        </head>
<body>
    <div class="page">
        <header>
            <div id="title">
                <h1>My MVC Application</h1>
            </div>
 
<ul class="t-widget t-reset t-header t-menu" id="menu"><li class="t-item t-highlighted t-state-default"><a class="t-link" href="/">Home<span class="t-icon t-arrow-down"></span></a><ul class="t-group"><li class="t-item t-state-default"><a class="t-link" href="http://www.google.com">google</a></li><li class="t-item t-state-default"><a class="t-link" href="http://www.microsoft.com">MS</a></li></ul></li><li class="t-item t-state-default"><a class="t-link" href="/Home/About">About<span class="t-icon t-arrow-down"></span></a><ul class="t-group"><li class="t-item t-state-default"><a class="t-link" href="http://www.google.com">google</a></li><li class="t-item t-state-default"><a class="t-link" href="http://www.microsoft.com">MS</a></li></ul></li></ul>       </header>
        <section id="main">
             
<h2>Welcome to ASP.NET MVC!</h2>
<p>
    To learn more about ASP.NET MVC visit <a href="http://asp.net/mvc" title="ASP.NET MVC Website">http://asp.net/mvc<;/a>.
</p>
 
<p>
    To learn more about working with the Telerik Extensions for ASP.NET MVC, you can visit the folowing resources:
</p>
<ul>
    <li><a href="http://demos.telerik.com/aspnet-mvc/">online demos</a></li>
    <li><a href="http://www.telerik.com/help/aspnet-mvc/introduction.html">online documentation</a></li>
    <li><a href="http://www.telerik.com/community/forums/aspnet-mvc.aspx">community forums</a></li>
    <li><a href="http://tv.telerik.com/products/aspnet-mvc">videos on Telerik TV</a></li>
</ul>
 
 
        </section>
        <footer>
        </footer>
    </div
</body>
</html>

BTW, there're no change for web.config file.

Does anyone could tell me what happened, or i miss something?
Thanks
Tags
General Discussions
Asked by
Chen
Top achievements
Rank 1
Share this question
or