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

[Solved] Sometimes the css and script files do not get loaded

0 Answers 19 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.
Nick
Top achievements
Rank 1
Nick asked on 16 Feb 2012, 11:07 AM
Hello,

we have an old webforms project which we adapted to mvc3 for the newly added pages. The mvc pages hav a layout page which uses the StyleSheetRegistrar and the ScriptRegistrar.

_Layout.cshtml:

<!DOCTYPE html>
<html>
  <head>
    <title>@ViewBag.Title</title>
 
    @Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group
                  .Add("telerik.common.css")
                  .Add("telerik.vista.css")
                  .Add("telerik.custom.css")
                  .Add("~/App_Themes/Default/jquery-ui.css")
                  .Add("~/App_Themes/Default/main.css")
                  .Add("~/App_Themes/Default/MasterPageMain.css")
                  .Add("~/App_Themes/Default/MasterPageShopping.css")
                  .Combined(true)
           )
 
    <script src = "@Url.Content("~/Scripts/jquery/jquery-1.4.4.js")" type="text/javascript"> </script>
    <script src = "@Url.Content("~/Scripts/jquery/jquery-ui.js")" type="text/javascript"> </script>
  </head>
  <body>
    <div id="siteContent">
      <div id="main">
        <div id="header">
          @Html.Partial("TopMenuControl")
        </div>
        <div>
            
          @RenderBody()
            
        </div>
      </div>
      <div id="prefooter">
      </div>
      <div id="footer">
        <div id="footerleft">
        </div>
        <div id="footerright">
        </div>
      </div>
    </div>
    @Html.Telerik().ScriptRegistrar().DefaultGroup(dg=>dg.Combined(true)).jQuery(false)
  </body>
</html>


Sometimes the css and the script files do not get loaded when coming from a webforms page, when we reload the page the css and script get loaded.
On a page with the telerik dropdownlist we get the following error:
Object doesn't support property or method 'tDropDownList'

This problem only occurs during development when we run the website on cassini. In our test environment where we use iis7 the problems hasn't occured.

Do you know of any problems with the registrars and Cassini or is there a problem with combining the files?

Best regards,
Nick
Tags
General Discussions
Asked by
Nick
Top achievements
Rank 1
Share this question
or