Get rid of the IsPostBack check, it will always be a postback.
private void compTxt_TextChanged(object sender, EventArgs e)
{
hiddenMsg.Visible = false;
}
For a client side solution, in your page load:
protected void Page_Load(object sender, EventArgs e)
{
compTxt.Attributes.Add("onclick", "document.getElementById('hiddenMsg').style.display = 'none';");
}
If you are using a Master Page in your project use this line instead in your page load:
compTxt.Attributes.Add("onclick", "document.getElementById('" + hiddenMsg.ClientID + "').style.display = 'none';");