Add the JavaScrip function between page header tags.
<script type="text/javascript">
function ShowAlert() {
alert('Im a Alert');
}
</script>
Call the JavaScript function on the OnClientClick event of the button.
<asp:Button ID="Button1" runat="server" Text="Show Alert" OnClientClick="ShowAlert(); return false;" />
No comments:
Write comments