有一问题请教:如果直接加载用户控件并传参数给topic.ascx的话,是这样:<uc1:topic id="Topic1" runat="server" strStyle="0">
现在我想动态加载用户控件,我这样:Dim mycontrol As UserControl = Page.LoadControl("~/UserPrivate/UserControls/posttopic.ascx")
                pnlUserControl.Controls.Add(mycontrol)
也要添加一个属性,我这样:mycontrol.Attributes.AddAttributes("TopicStyle = 0")
其中,TopicStyle是我在posttopic.ascx中定义的变量.但这样添加属性有错.不知怎么改.请高人指点一下.