asp.net pass javascript code from database
<p><strong>The Question:</strong></p>

<p>Is there a way that I can pass a JavaScript function into a page (from a database) to be run?</p>

<p><strong>Background info</strong></p>

<p>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).</p>

<p>Unfortunately I have one page that has some routing requirements (i.e. if you choose option 1, then hide item x)</p>

<p>I could solve this by having a custom page, but it would be nice if I could come up with a more robust solution.</p>

<p>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.</p>
