首页 新闻 会员 周边

Web用户控件后台动态向Controls添加控件的问题

0
悬赏园豆:20 [已解决问题] 解决于 2008-08-01 21:03
<P>用户控件开发,后台动态向Controls里添加了控件,则前台页面不能用&lt;%= %&gt;块,而前台的JS代码的确有需要用到后台的属性,应该怎么办?</P>
wuyou331的主页 wuyou331 | 初学一级 | 园豆:101
提问于:2008-08-01 20:18
< >
分享
最佳答案
0
什么逻辑前面不能用<%%>?? public UserControl uc; protected void Page_Load(object sender, EventArgs e) { UserControl uc = this.LoadControl(".....") as UserControl; this.uc=uc; this.Controls.Add(uc); } 前面页面不是可以引用uc的所有属性了? 不懂你问的是不是这个,说得不太清楚
無尽海 | 小虾三级 |园豆:540 | 2008-08-01 20:39
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册