DataListDesigner.GetErrorDesignTimeHtml(Exception) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取在呈现控件时遇到错误时在指定异常的设计时显示的 HTML。
protected:
override System::String ^ GetErrorDesignTimeHtml(Exception ^ e);
protected override string GetErrorDesignTimeHtml(Exception e);
override this.GetErrorDesignTimeHtml : Exception -> string
Protected Overrides Function GetErrorDesignTimeHtml (e As Exception) As String
参数
发生的异常。
返回
在设计时显示的指定异常的 HTML。
示例
下面的代码示例演示如何重写 GetErrorDesignTimeHtml 方法,以在发生异常时修改设计图面上的控件的外观 DataList 。
该代码示例是 DataListDesigner 类中的一个较大示例的一部分。
protected override string
GetErrorDesignTimeHtml(System.Exception exc)
{
return CreatePlaceHolderDesignTimeHtml(
"ASPNET.Examples: An error occurred while rendering the GridView.");
}
Protected Overrides Function _
GetErrorDesignTimeHtml(ByVal exc As Exception) As String
Return CreatePlaceHolderDesignTimeHtml( _
"ASPNET.Examples: An error occurred while rendering the GridView.")
End Function