Example #1
0
        //========================================================================================================
        #endregion

        #endregion

        #region private methods
        private void createControlWebContents(Control ct, XmlNode parentNode, int groupId)
        {
            XmlNode           nodeNext = parentNode;
            IWebClientControl webc     = ct as IWebClientControl;

            if (webc != null)
            {
                XmlNode nd = parentNode.OwnerDocument.CreateElement(webc.ElementName);
                parentNode.AppendChild(nd);
                XmlUtil.SetAttribute(nd, "id", webc.CodeName);
                webc.CreateHtmlContent(nd, EnumWebElementPositionType.Auto, groupId);
                WebPageCompilerUtility.CreateElementAnchor(webc, nd);
                _resourceFiles.AddRange(webc.GetResourceFiles());
                Dictionary <string, string> hp = webc.HtmlParts;
                if (hp != null && hp.Count > 0)
                {
                    foreach (KeyValuePair <string, string> kv in hp)
                    {
                        _htmlParts.Add(kv.Key, kv.Value);
                    }
                }
                nodeNext = nd;
            }
            IWebPageLayout lt = ct as IWebPageLayout;

            if (lt == null)
            {
                foreach (Control c in ct.Controls)
                {
                    createControlWebContents(c, nodeNext, groupId);
                }
            }
        }