1.导入用户控件的命名空间
    也就是导入usercontrol.ascx.cs中namespace后面的那部分
2.在webform.aspx.cs的page_load()中添加
        protected (usercontrol_TagName) (usercontrol_id);
3.在webform.aspx.cs中注册usercontrol的事件
    this.(usercontrol_id).(event) += new (event)Handler((usercontrol_id)_(event));

之后就可以在webform.aspx.cs中使用用户控件的属性和方法了.
posted on 2006-12-11 11:55  Suntears  阅读(1172)  评论(1编辑  收藏  举报
点击这里给我发消息