父容器包含一个用户控件,我想在该用户控件中点一个按钮的时候清除这个控件并把另外一个用户控件加载到父容器中,不知道怎么搞呢?PS:
this.parent.controls.clear();
this.parent.controls.add(new newcontrol());
这样出错
this.parent.controls.clear();
this.parent.controls.add(new newcontrol());
这样出错
解决方案 »
- C# 回发页面不用static怎么写???大虾进,谢谢!!
- c#中运算符==重载的问题
- 请问这是什么原因?强类型DataSet的表被Fill后内容没了?
- 建立 xml 文件
- 取消按钮代码
- 关于Combo控件
- c#每日一题(九)
- 【新手女程询问】关于password的检查,刚来不好意思没有分,谁告诉我我就认谁做师傅了!
- 大家来分析一下这个程序
- Metro程序UI线程阻塞的问题?
- 关于无刷新页面的问题(急)!
- 编译时出错(Assembly attribute 'System.Runtime.InteropServices.GuidAttribute' is not valid: Assembly custom attribute 'System.Ru
this.parent.controls.clear();在前面
后面的this.parent.controls.add(new newcontrol());中的this已经不存在了不知道各位还有没其他办法
parent.controls.clear();
parent.controls.add(new newcontrol());
是我自己的问题Control parent = this.Parent;
parent.controls.clear();
parent.controls.add(new newcontrol());