registering javascript function using ScriptManager.RegisterClientScriptBlock
<p>I have following script registered on page load:</p>

<pre><code>    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "watermark", "function WaterMark(txtWaterMark, event,text) { if (txtWaterMark.value.length &gt; 0 &amp;&amp; event.type == 'mouseover') {txtWaterMark.style.color = '#c6c1c1'; if(txtWaterMark.value == text) {txtWaterMark.value = text;} } if (txtWaterMark.value.length &gt; 0 &amp;&amp; event.type == 'mouseout') {txtWaterMark.style.color = 'gray';if (txtWaterMark.value.length == 0){txtWaterMark.value = text;} } if (event.type == 'focus' ) {alert(txtWaterMark.value); if(txtWaterMark.value == text){txtWaterMark.value = '';} } }", true);
</code></pre>

<p>Can I create this function in aspx and register in cs ?</p>
