ObjectDataSourceView.OnObjectCreating(ObjectDataSourceEventArgs) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
ObjectCreating在对象创建业务对象的实例以执行数据操作之前ObjectDataSourceView引发该事件。
protected:
virtual void OnObjectCreating(System::Web::UI::WebControls::ObjectDataSourceEventArgs ^ e);
protected virtual void OnObjectCreating(System.Web.UI.WebControls.ObjectDataSourceEventArgs e);
abstract member OnObjectCreating : System.Web.UI.WebControls.ObjectDataSourceEventArgs -> unit
override this.OnObjectCreating : System.Web.UI.WebControls.ObjectDataSourceEventArgs -> unit
Protected Overridable Sub OnObjectCreating (e As ObjectDataSourceEventArgs)
参数
包含事件数据的一个 ObjectDataSourceEventArgs 。
注解
引发事件会通过委托调用事件处理程序。 有关如何处理事件的详细信息,请参阅 处理和引发事件。
该方法 OnObjectCreating 还允许派生类在不附加委托的情况下处理事件。 这是处理派生类中的事件的首选技术。
继承者说明
在 OnObjectCreating(ObjectDataSourceEventArgs) 派生类中重写方法时,请务必调用 OnObjectCreating(ObjectDataSourceEventArgs) 基类的方法,以便已注册的委托接收事件。