开发者

How to call javascript function of asp.net user control

开发者 https://www.devze.com 2022-12-28 12:22 出处:网络
i hv designed one user control, and used on my aspx pages whereever needed. my user control does not havetag.

i hv designed one user control, and used on my aspx pages whereever needed. my user control does not have tag. now i wa开发者_JAVA技巧nt to call some javascript function onload of this user control. can anyone tell me how to achieve....... ?

any help appreciated

Regards, Manoj


You can just type the script directly in the body of your .ascx file, for example:

<script type="text/javascript">
    window.onload = function() {
        initialize();
    }

    window.onunload = function() {
        GUnload();
    }
</script>
0

精彩评论

暂无评论...
验证码 换一张
取 消