Monday, May 7, 2012

Call javascript Function from aspx.cs page..

.aspx page

<script type="text/javascript">
        function alertMe() {
            alert('Hello');
        }
    </script>

aspx.cs Page

 if (!ClientScript.IsStartupScriptRegistered("alert"))
 {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alertMe();", true);
}

0 comments:

Post a Comment