[ParseChildren(true, "Content")]
[PersistChildren(true)]
public partial class Controls_Popup : System.Web.UI.UserControl
{
public string ppId;
private Control _content;
private Control _footer;
[PersistenceMode(PersistenceMode.InnerProperty)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public Control Content
{
get { return _content; }
set { _content = value; }
}
public Control Footer
{
get {
if (_footer == null)
{
_footer = new Control();
}
return _footer; }
set { _footer = value; }
}
protected void Page_Load(object sender, EventArgs e)
{
ppContent.Controls.Add((Control)_content);
ppFooter.Controls.Add((Control)_content);
}
}
<div id="<%=ppId%>" class="popup" style="display:none">
<div class="popup-content" style="width:300px">
<div class="popup-btn-close" onclick="ShowPP('<%=ppId%>');">
<img height="24" alt="" src="../../Style/img/IconGrey24DeleteLight.png" />
</div>
<div id="ppContent" runat="server" class="popup-content-2">
</div>
<div id="ppFooter" runat="server" class="popup-func-btns">
</div>
</div>
<div class="popup-bg" onclick="ShowPP('<%=ppId%>');"></div>
</div>