在ASP.NET中,用按钮实现动态添加用户控件功能,但如何实现点击一次按钮就动态添加一次用户控件? 30
1个回答
展开全部
ystem.Web.UI.HtmlControls.HtmlContainerControl div1 = new HtmlGenericControl();
div1.InnerHtml = " <iframe width=420 height=330> dsafsafa </iframe> ";
Page.Controls.Add(div1);
System.Web.UI.HtmlControls.HtmlGenericControl div1 = new HtmlGenericControl();
Image Image1 = new Image();
Image1.ImageUrl = "你的数值 ";
HyperLink link1 = new HyperLink();
link1.NavigateUrl = "你的控件 ";
div1.Controls.Add(Image1);
div1.Controls.Add(link1);
在asp.net中,从后台动态添加DIV及其他控件
2008-12-21 15:56
Panel div1 = new Pane();
HtmlGenericControl iframe1 = new HtmlGenericControl( "iframe ");
div1.Controls.Add(iframe1);
div1.Visible = true;
iframe1.Visible = true;
Page.Form.Controls.Add(div1);
iframe1.Attributes.Add( "src ", "http://www.sohu.com ")
div1.InnerHtml = " <iframe width=420 height=330> dsafsafa </iframe> ";
Page.Controls.Add(div1);
System.Web.UI.HtmlControls.HtmlGenericControl div1 = new HtmlGenericControl();
Image Image1 = new Image();
Image1.ImageUrl = "你的数值 ";
HyperLink link1 = new HyperLink();
link1.NavigateUrl = "你的控件 ";
div1.Controls.Add(Image1);
div1.Controls.Add(link1);
在asp.net中,从后台动态添加DIV及其他控件
2008-12-21 15:56
Panel div1 = new Pane();
HtmlGenericControl iframe1 = new HtmlGenericControl( "iframe ");
div1.Controls.Add(iframe1);
div1.Visible = true;
iframe1.Visible = true;
Page.Form.Controls.Add(div1);
iframe1.Attributes.Add( "src ", "http://www.sohu.com ")
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询