控件开发学习笔记(2)

开发服务器控件常用接口:

  1.INamingContainer,标识在 Page 对象的控件层次结构内创建新 ID 命名空间的容器控件。这仅是一个标记接口。

  2.IPostBackDataHandler,定义 ASP.NET 服务器控件为自动加载回发数据而必须实现的方法。

1 bool LoadPostData(string postDataKey, NameValueCollection postCollection);
2 void RaisePostDataChangedEvent();

  3. IPostBackEventHandler,定义 ASP.NET 服务器控件为处理回发事件而必须实现的方法。

1 void RaisePostBackEvent(string eventArgument);

  4.IPostBackContainer,定义一个方法,使控件能够获取客户端脚本选项。

1 PostBackOptions GetPostBackOptions(IButtonControl buttonControl);

  5.ICallbackContainer,定义一个方法,使控件能够获取回调脚本。

1 string GetCallbackScript(IButtonControl buttonControl, string argument);

  6.ICallbackEventHandler,用于指示控件可以作为服务器的回调事件的目标。

1 string GetCallbackResult();
2 void RaiseCallbackEvent(string eventArgument);

  

 

原文地址:https://www.cnblogs.com/zhuhc/p/2957153.html