I want to create scripts, and then call them from the html code or the ASP.Net codebehind. How do I do that?
This is probably very simple, but Googling hasn't helped.
For example: I want an ImageButton
to have an onmouseover="this.src='...'"
. But I want the script to be separate instead of inline.
Especial for this part of your code
onmouseover="this.src='...'"
you make a function as
<script>
function cOnMouseOver(me)
{
me.src='...';
}
</script>
and you call it as : onmouseover="cOnMouseOver(this);"
or set it on code behind using the Attributes
of this control