I think sometimes your message is coming with special characters like
' (Single Quote) or " (Double Quote)
. Try removing that from the
msg
variable.
string msg = "Doesn't match the words .";
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Success", "alert('Notification : " + msg + "');window.location='Home.aspx';", true);
Hope it helps.
--Amit