Custom mvc htmlhelper candidate?

We have a bunch of pages where there is a audio/video player inside the page.

Instead of adding all the js/css required for the player in each of these pages, I am thinking of adding a @Html.MediaPlayer helper that will take the file path as a parameter and spits out the js/css and the html script required to display the player. Is this a good idea? Is there a better a way to do it?

Answers


Writing a custom reusable helper for this scenario looks like a good approach. An alternative method would be to use a partial view that could be included.


Need Your Help

iTunes 10.6.3 changes AppleScript interface?

ruby applescript itunes rb-appscript

I have a simple Ruby script that uses the rb-appscript gem to control iTunes, and now that I've updated to iTunes 10.6.3, it appears to be broken.