Call the script from a view

Call the script from a view

  1. In the Solution Explorer, open Views Home Index.cshtml.

    Open Index.cshtml

  2. Change the code to be the following:

    @{
      ViewBag.Title = "Home Page";
    }
    <script src="~/Scripts/App/app.js"></script>
    <div id="message"></div>
    <div>
      Compiler: <input id="compiler" value="TypeScript" onkeyup="document.getElementById('message').innerText = sayHello()" /><br />
      Framework: <input id="framework" value="ASP.NET" onkeyup="document.getElementById('message').innerText = sayHello()" />
    </div>
    
doc_TypeScript
2016-10-04 19:25:04
Comments
Leave a Comment

Please login to continue.