I am creating an asp.net MVC application.
I have a view named "receive" and it placed in Views/Main folder.
I am trying to add js file.
In intellisense, I am getting access to js file functions.
But when I run the application, the js file is not linking.
My view is as follow
@model dSite.Models.MModels
<script type="text/javascript" src="../../Scripts/Jquery-2.1.js"> </script>
<script>
$("#btn").click(function ()
{ alert("aa");
});
</script>
@{
ViewBag.Title = "receive";
}
<h2>
receive</h2>
<input type="text" id="txtname" placeholder="enter name" />
<input type="button" id="btn" value="click here" />
And my Scripts folder is at the root.
How can I link my js file to my view? I have tried the above but it's not working
following is the file structure
Js files structure