aspx部分

 

<body>
<div id="div1" runat="server">
</div>
</body>

 

 

.cs部分

 

 protected void Page_Load(object sender, EventArgs e)
 {

WebUserControl1 control
= (WebUserControl1)Page.LoadControl("WebUserControl1.ascx");
 
this.div1.Controls.Add(control);

}

 

相关文章:

  • 2021-07-23
  • 2022-12-23
  • 2021-08-16
  • 2021-11-11
  • 2022-12-23
  • 2021-08-31
  • 2022-12-23
猜你喜欢
  • 2021-07-14
  • 2022-03-06
  • 2022-01-28
  • 2022-12-23
  • 2021-07-29
  • 2022-12-23
相关资源
相似解决方案