Generally in some applications, we use labels to display error message. But even when some operations are done, the label text will be displayed what we initially show.I would like to show how we can disable label after some amount of time using Jquery.
<script type="text/javascript" src="JScript.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#<%= Label1.ClientID %>').fadeOut(1500, function() {
$(this).html(""); //reset the label after fadeout
});
});
</script>
Drag and drop a label on to the form:
<asp:Label ID="Label1" runat="server" />
Download Jquery 1.7 that was required from here:
http://docs.jquery.com/Downloading_jQuery[
^]