Add below java script in .aspx page
<script type="text/javascript">
function HideLabelText() {
var _Second = 3; // Specify duration in second
setTimeout(function () {
document.getElementById("<%=lblMessage.ClientID %>").style.display = "none";
}, _Second * 1000);
};
</script>
lblMessage is a ID of Label control
_Second = 3 i.e It will hide label after 3 seconds , you can change this as per your need.
Add below lines in the event handler in your code.
C#.NET : ClientScript.RegisterStartupScript(this.GetType(), "alert", "HideLabelText();", true);
VB.NET : ClientScript.RegisterStartupScript(Me.[GetType](), "alert", "HideLabelText();", True)
<script type="text/javascript">
function HideLabelText() {
var _Second = 3; // Specify duration in second
setTimeout(function () {
document.getElementById("<%=lblMessage.ClientID %>").style.display = "none";
}, _Second * 1000);
};
</script>
lblMessage is a ID of Label control
_Second = 3 i.e It will hide label after 3 seconds , you can change this as per your need.
Add below lines in the event handler in your code.
C#.NET : ClientScript.RegisterStartupScript(this.GetType(), "alert", "HideLabelText();", true);
VB.NET : ClientScript.RegisterStartupScript(Me.[GetType](), "alert", "HideLabelText();", True)