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中使用用户控件的属性和方法了.
作者:吴旭晓 | 来源:个人博客 | 点击量:2673 | 发布时间:2010-09-11
最新留言 |
返回上一页 |
返回首页