【发布时间】:2011-02-24 16:13:32
【问题描述】:
我正在使用 WebPartManager 开发自定义 ASP.Net WebPart,并且我也在创建自定义 EditorPart。对于它的 EditorPart.ApplyChanges 方法,只要出现错误,我就会将 返回值设置为 false。
在 EditorZone 中,我收到一条标准错误消息,表明编辑器发生了一些错误,但我想更改该消息。 那可能吗?比如……
public override bool ApplyChanges()
{
try
{
// save properties
return true;
}
catch(Exception ex)
{
ErrorMessage = ex.Message; // is there any similar property I can fill?
return false;
}
}
【问题讨论】: