ASP.NET MVC2 Inject Javascript to masterpage from partial control
I'm moving my script references from < head> in the master to bottom right before < /body>.
This has caused some problems with my load order.
In my master I have a ContentPlaceHolder, and I can use this fine from my Views to add additional javascripts.
But how can I add javascripts to this section from a PartialControl?
If I just include the scripts from the control the scripts will load in the wrong order (The script from the PartialControl will render before the scripts in the master). I need to be able to add scripts from my partial view to my ContentHolder in the page.
How shall I tackle this problem? At first I was thinking of an HtmlHelperExtension, but I can't reach the master page from the HtmlHelper object.
开发者_Python百科Thanks in advance.
精彩评论