views:

58

answers:

1

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.

Thanks in advance.

+2  A: 

Hey @Olle, maybe in this blog post you can find what you´re looking for.

Good luck!

uvita
+1 Spot on! Great find.
WestDiscGolf
Thanks, seems promising. I'll test it later this week.
Olle
I'm not able to get the "JavaScriptManagerProxy" to run from a Shared View Control got null exception. Am I missing something?
Olle