Hi,
I am using MVC 2. I have a master page and a view that uses this master page. I have to use a javascript file for this view only, and not for the other views. What is the best way to add a javascript file to this view? What I currently did was to add the javascript file at the top in my content tag. Is this the best way to do it? I did it as follows:
<asp:Content ID="cntMain" ContentPlaceHolderID="cphMain" runat="server">
<script src="../../Scripts/myjs.js" type="text/javascript"></script>
</asp:Content>
The content place holder for this content tag in my master page is in a div, so it is complaining that a script tag can not be in a div, and underlines it in green. So I am assuming that there is another decent way of doing this?
Thanks