我写了一个App类,其中有个ShowErrors方法。
public class App
{
  public void ShowErrors(string ErrorMessage, string Source, string CustomMessage)
  {
    
  }
}
请问如何才能把这些错误信息输出到页面上。
Response对象此时因为App类没有继承System.Web.UI.Page,而无法使用。
我现在
System.Web.UI.Page ErrorPage=new System.Web.UI.Page();
ErrorPage.Response.Write("以下是出错详细信息:<pre>" + ErrorMessage + "</pre>");
这么些,编译通过,运行时出错。
请教大虾们,这个问题如何解决?