Server-side IDs and IDs in the Javascript are not the same. You need to use the ClientID when constructing that JavaScript snippet:
<script type="text/javascript" language="javascript">
$("<%=lblmsg.ClientID%>").delay(5000).fadeOut(100);
</script>
Or you can set ClientIDMode to Static.
Also, that JS code looks like jQuery – have you included jQuery in your deployment and linked to it with a script tag? It is not just hiding the label, it is setting a timer and then applying a fade effect.
To hide a control you do:
<script type="text/javascript" language="javascript">
document.getElementById("<%=lblmsg.ClientID%>").style.display = 'none';
</script>