How do I use master page container in partial view
- by user200295
I have several partial views with Javascript that I am trying to move to the bottom of the page. To do this I am trying to use a container in the master page
Master Page -
<asp:ContentPlaceHolder ID="Foot" runat="server"></asp:ContentPlaceHolder>
Partial view(ascx)
<asp:Content ID="header" ContentPlaceHolderID="head" runat="server">
...
</asp:Content>
But I get this error
Parser Error Message: Content controls have to be top-level controls in a content page or a nested master page that references a master page.
So how do I ensure that the Javascript for the partial view is at the bottom of the page? Especially in cases where the html layout needs to be at the top of the page?