sharplife


software is a artwork, also make the life better !!!
  首页  :: 联系 :: 订阅 订阅  :: 管理

ASP.NET使用动态加载控件,注意页面生命周期

Posted on 2008-07-30 21:23  sharplife  阅读(416)  评论(0编辑  收藏  举报
  1. Add the dynamic controls on each page visit in the page's Initialization stage,
  2. Read/write the dynamic controls' properties and methods in the Page_Load event handler.
Dynamic web control for postback,state...

在页面结构生成(页面树)之前更改控件集,利用页面声明周期的LoadViewState自动维护动态添加
的控件状态,无需额外操作。