The Question:
Is there a way that I can pass a JavaScript function into a page (from a database) to be run?
Background info
I have developed a metadata driven asp.net mvc web site (basically I change data in the db, and the pages get generated on the fly).
Unfortunately I have one page that has some routing requirements (i.e. if you choose option 1, then hide item x)
I could solve this by having a custom page, but it would be nice if I could come up with a more robust solution.
So what I am thinking is that I can attach an onchange event handler (based on a metadata value), and then somehow have some code that is executed based on that onchange event.