title: Javascript file not loading in aspx ? ASP.NET C#
body: <p>I want this type of functionality in my project.</p>
  
  <p>Here is <a href="http://jsbin.com/xikikamufa/3/edit?html,css,js,output" rel="nofollow">the JS Bin link</a>.</p>
  
  <p>There are 3 files <code>stylesheet.css</code>, <code>javascript.js</code> and a html file.</p>
  
  <p>I'm trying in Visual Studio 2010 ASP.NET C# but it is not working: the Javascript file is not loaded.</p>
  
  <p><strong>ASPX code:</strong></p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
      &lt;head runat="server"&gt;
          &lt;title&gt;&lt;/title&gt;
          &lt;link rel="stylesheet" href="StyleSheet.css" type="text/css" /&gt;
          &lt;script type="text/javascript" src="JScript.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;form id="form1" runat="server"&gt;
              &lt;div id="editor" contenteditable="true"&gt;&lt;/div&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>StyleSheet.css</strong>:</p>
  
  <pre><code>body {
  }
  
  #editor {
      width: 400px;
      height: 100px;
      padding: 10px;
      background-color: #444;
      color: white;
      font-size: 14px;
      font-family: monospace;
      display:block;
  }
  
  .statement {
      color: orange;
  }
  </code></pre>
  
  <p><strong>JScript.js</strong>:</p>
  
  <pre><code>$("#editor").on("keydown keyup", function (e) {
  if (e.keyCode == 32) {
      var text = $(this).text().replace(/[\s]+/g, " ").trim();
      var word = text.split(" ");
      var newHTML = "";
  
      $.each(word, function (index, value) {
          switch (value.toUpperCase()) {
              case "SELECT":
              case "FROM":
              case "WHERE":
              case "LIKE":
              case "BETWEEN":
              case "NOT LIKE":
              case "FALSE":
              case "NULL":
              case "FROM":
              case "TRUE":
              case "NOT IN":
                  newHTML += "&lt;span class='statement'&gt;" + value + "&amp;nbsp;&lt;/span&gt;";
                  break;
              default:
                  newHTML += "&lt;span class='other'&gt;" + value + "&amp;nbsp;&lt;/span&gt;";
          }
      });
      $(this).html(newHTML);
  
      //// Set cursor postion to end of text
      var child = $(this).children();
      var range = document.createRange();
      var sel = window.getSelection();
      range.setStart(child[child.length - 1], 1);
      range.collapse(true);
      sel.removeAllRanges();
      sel.addRange(range);
      $(this)[0].focus();
  }
  });
  </code></pre>
  
  <p><code>JScript.js</code> file is not working. <code>Keyword</code> color not changing but i provided the link its working fine.</p>
  
  <p>How can i resolve this issue?</p>