I’m trying to enabled the disabled button using on clicking of the html button in asp.net.
but its not getting enbled.
here is my code
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
function setDefaults() {
var btn = document.getElementById("btn");
btn.disabled = false;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<button onclick="javascript:setDefaults();" causesvalidation="false">Defaults</button>
<asp:Button ID="btn" runat="server" Text="btn" Enabled="false" />
</div>
</form>
</body>
</html>
please let me know whats wrong with my attempt.
you are using button but is it html or asp.net?
use
or