• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 678
  • Last Modified:

MVC 4.0: these javascript files and css files are not working in this _Layout.cshtml files

How do i install these Javascript files and css file in MVC a cshtml file?
all the other .js and css files that are working i.e.
<link rel="stylesheet" href="@Url.Content("~/Content/Site.css")" />

these javascript files and css files are not working in this _Layout.cshtml files
 +++++
<link rel="stylesheet" type="text/css" href="qunit/qunit.css" media="screen">

<script type="text/javascript" src="js/libs/modernizr-2.0.min.js"></script>
 <script type="text/javascript" src="js/script.js"></script>
 <script type="text/javascript" src="qunit/qunit.js"></script>
 <script type="text/javascript" src="tests.js"></script>

+++++
<html> 
	<head> 
        <meta charset="utf-8" />
	    <title>@ViewBag.Title</title> 
        <meta name="viewport" content="width=device-width, initial-scale=1" />

        <link rel="stylesheet" href="@Url.Content("~/Content/jquery.mobile-1.0b2.css")" />
	    <!-- <link rel="stylesheet" href="@Url.Content("~/Content/jquery.mobile-1.0b2.min.css")" /> -->
        <link rel="stylesheet" href="@Url.Content("~/Content/Site.css")" />
      
	    <script type="text/javascript" src="@Url.Content("~/Scripts/jquery-1.6.2.min.js")"></script>
        <script type="text/javascript">
            $(document).bind("mobileinit", function() {
                // As of Beta 2, jQuery Mobile's Ajax navigation does not work in all cases (e.g.,
                // when navigating from a mobile to a non-mobile page, or when clicking "back"
                // after a form post), hence disabling it.
                $.mobile.ajaxEnabled = false;
            });
        </script>
        <script type="text/javascript" src="@Url.Content("~/Scripts/jquery.mobile-1.0b2.min.js")"></script>

      <link rel="stylesheet" type="text/css" href="qunit/qunit.css" media="screen">
      
      <script type="text/javascript" src="js/libs/modernizr-2.0.min.js"></script>
      <script type="text/javascript" src="js/script.js"></script>
	  <script type="text/javascript" src="qunit/qunit.js"></script>
	  <script type="text/javascript" src="tests.js"></script>

Open in new window

0
westdh
Asked:
westdh
1 Solution
 
Rouneh10Commented:
Have you tried using the same syntax for the non-working files?

<link rel="stylesheet" type="text/css" href="@Url.Content("~/qunit/qunit.css")" media="screen">
<script type="text/javascript" src="@Url.Content("~/js/libs/modernizr-2.0.min.js")"></script>
<script type="text/javascript" src="@Url.Content("~/js/script.js")"></script>
<script type="text/javascript" src="@Url.Content("~/qunit/qunit.js")"></script>
<script type="text/javascript" src="@Url.Content("~/tests.js")"></script>

Open in new window

0
 
westdhAuthor Commented:
That was it thanks
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now