AConnorABBCO
06-03-2005, 08:40 AM
I'm trying to add an attribute to my button so that when I click it, it calls the javascript function "clear();". This is what I have so far, but for some reason it is just not doing anything. I tried just putting a simple "alert" in the function but that isn't even doing anything
<code>
<script runat="server">
Sub Page_Load
clearButton.Attributes.Add("OnClick","clear();")
End Sub
</script>
<asp:button id="clearbutton" runat="server" text="Clear Alert"></asp:button>
</code>
Any ideas on how to make this work?
<code>
<script runat="server">
Sub Page_Load
clearButton.Attributes.Add("OnClick","clear();")
End Sub
</script>
<asp:button id="clearbutton" runat="server" text="Clear Alert"></asp:button>
</code>
Any ideas on how to make this work?