protected override void CreateChildControls()
        {
            img          = new RsImageButton();
            img.ID       = UWeb.GetUniqueName(this, "img");
            img.ImageUrl = UWeb.ResUrl(this, "img.ico");
            Controls.Add(img);

            lnk             = new RsHyperLink();
            lnk.ID          = UWeb.GetUniqueName(this, "lnk");
            lnk.NavigateUrl = UWeb.ResUrl(this, "lnk.ico");
            Controls.Add(img);
        }
        protected override void CreateChildControls()
        {
            img = new RsImageButton();
            img.ID = UWeb.GetUniqueName(this, "img");
            img.ImageUrl = UWeb.ResUrl(this, "img.ico");
            Controls.Add(img);

            lnk = new RsHyperLink();
            lnk.ID = UWeb.GetUniqueName(this, "lnk");
            lnk.NavigateUrl = UWeb.ResUrl(this, "lnk.ico");
            Controls.Add(img);
        }
    public void CreateControl()
    {
        if (Attribute.Name == "")
        {
            return;
        }

        Object o = GetControl();
        RsCtrl = (IRsControl)o;
        Ctrl = (Control)o;

        if (Uc.LayoutID == LayoutE.View || Uc.LayoutID == LayoutE.SearchResult)
        {
            string val = "";
            
            if (Uc.LayoutID == LayoutE.SearchResult)
            {
                string url = UWeb.GetUrlItemEdit(Uc.ServiceID, LayoutE.View, Uc.CategoryID, Uc.ItemID);

                url = url.Replace("~/", base.BaseMasterPage.BaseUrl + "/");

                val = UStr.More(UStr.StripHtml(RsCtrl.GetText(ItemAttribute)), 300, url);
            }
            else
            {
                val = RsCtrl.GetText(ItemAttribute);
            }

            if (RowIndex == 0 && Uc.LayoutID == LayoutE.SearchResult)
            {
                RsHyperLink cx = new RsHyperLink();
                cx.CssClass = "lnksr";
                cx.Text = val;
                cx.NavigateUrl = UWeb.GetUrlItemEdit(Uc.ServiceID, LayoutE.View, Uc.CategoryID, Uc.ItemID);
                o = cx;
            }
            else 
            {
                RsLabel cx = new RsLabel();
                cx.Text = val;
                o = cx;
            }
        }

        RsCtrl = (IRsControl)o;
        Ctrl = (Control)o;
        Ctrl.ID = "c" + Attribute.ID;
        
        ph2.Controls.Add(Ctrl);

        if (Attribute.AttributeLayout.ID == 1)
        {
            // you have to load attribute layout and apply to it
            // now you will have attribute config instead of layout
        }

        CreateValidationControl();
    }