-1
在我的應用程序中,我想重定向到錯誤頁面。有一個標籤會在錯誤頁面上顯示用戶友好的錯誤。我可以重定向到頁面。問題在於將標籤設置爲用戶友好的錯誤。然後重定向到錯誤頁面並顯示用戶友好錯誤
HttpContext.Current.Response.Redirect("ssperror.aspx?err_id=4");
在ssperror.aspx:
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.
}