Answer: With the help of disabled property,we can Disable any controls in Javascript.
In Dot net,we have Enabled property,but in Javascript it's just opposite.
For Example:-
<script type="text/javascript">
function disable_controls()
{
document.getElementById('<%=btn_read_cookies.ClientID%>').disabled = true;
}
</script>
<asp:Button ID="Button1" runat="server" Text="Click" OnClientClick="disable_controls(); return false;" />
Asked In: Many Interviews |
Alert Moderator