I have this code:
protected void Page_Load(object sender, EventArgs e)
{
try
{
Tool tool = new Tool();
if (!Page.IsPostBack)
{
grdTools.DataSource = tool.GetParentTools();
grdTools.DataBind();
}
}
catch (ApplicationException ex)
{
lblMessage.Visible = true;
lblMessage.Text = ex.Message;
}
} I want that if an error ocurrs the code enters to the catch block, show the error in the Label lblMessage and do not show the .NET error default error screen.
Go to the complete details ...