This is the code.
For using this code you need to import System.Cofiguration Namespace.
This particular code calls a message box from an asp.net code.
ScriptManager.RegisterStartupScript(this, this.GetType(), "Msg", "alert('Invalid UserName or Password');", true);