Q:

How to add Js file for a aspx page in MVC

i have a set of aspx page & its associated controller. now i want to add a js file for a aspx page. i'm not getting how to add and link to particular aspx page in MVC.
what is the easiest way to add and link for the particular aspx page.
Edit 
i created a folder inside Scripts-->Views-->Controllername-->somejsfile.js file.
in site master, below the jquery scripts loading place, i added 
<script src="/Scripts/Views/ControllerName/somejsfile.js?Version=<%=ConfigurationManager.AppSettings["ScriptVersion"]%>" type="text/javascript"></script>

Now i have added init function inside js like 
var somejsfileNamescript= function () {
    return {

        Init: function () {

            alert("Hello");

        }
    }
} ();

I want this to get executed when the page is loaded. This is the only one js file present in my application
thanks

A:

It is that simple, in your master file add a <script> block and use the jquery $(document).ready() function to init the script. (Assuming you are using jquery)
<script>
$(document).ready(function() {
    somejsfileNamescript.Init();
});
</script>

