在我的应用程序中,我想重定向到错误页面。有一个标签会在错误页面上显示用户友好的错误。我可以重定向到页面。问题是将标签设置为用户友好的错误。
if (xy.Count() >= 1)
{
foreach (var x in xy)
{
employeeEmploy.Add(x);
Debug.WriteLine(x.employee_personal_id);
}
}
else
{
Security.ErrorControl.displayErrorMsg = "Employee Employ currently doesn't have any persons inside";
Debug.WriteLine(Security.ErrorControl.displayErrorMsg); // class that set and get the error message i want to display
HttpContext.Current.Response.Redirect("ssperror.aspx"); // I am getting to redirect .. just need to set the label to the error message.
}