• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# WebControls.Panel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Web.UI.WebControls.Panel的典型用法代码示例。如果您正苦于以下问题:C# Panel类的具体用法?C# Panel怎么用?C# Panel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Panel类属于System.Web.UI.WebControls命名空间,在下文中一共展示了Panel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=F:\git\web-application-dev\online_album\App_Data\Database1.mdf;Integrated Security=True"); //创建连接对象
            con.Open();
            SqlCommand cmd = new SqlCommand("select * from [photo]", con);
            SqlDataReader dr = cmd.ExecuteReader();

            while (dr.Read())
            {
                Panel box = new Panel();
                box.CssClass = "box";
                Panel1.Controls.Add(box);

                Image photo = new Image();
                photo.CssClass = "photo";
                photo.ImageUrl = "~/Images/" + dr["uid"].ToString() + "/" + dr["filename"].ToString(); ;
                box.Controls.Add(photo);

                box.Controls.Add(new Literal() { Text = "<br />" });

                Label uid = new Label();
                uid.Text = dr["uid"].ToString();
                box.Controls.Add(uid);

                box.Controls.Add(new Literal() { Text = "<br />" });

                Label datetime = new Label();
                datetime.Text = dr["datetime"].ToString();
                box.Controls.Add(datetime);
            }
        }
开发者ID:do-you,项目名称:web-application-dev,代码行数:31,代码来源:index.aspx.cs


示例2: PopulateCarousel

        private void PopulateCarousel()
        {
            List<BLCategory> categories = BLCategory.RetrieveListFromDB(connectionString);
            foreach (BLCategory category in categories)
            {
                Image image = new Image
                {
                    CssClass = "carousel-image",
                    ImageUrl = $"ImgHandler.ashx?categoryId={category.Id}"
                };
                HyperLink link = new HyperLink
                {
                    NavigateUrl = $"/Result.aspx?categoryId={category.Id}"
                };
                link.Controls.Add(image);

                Label captionLabel = new Label
                {
                    Text = $"<h3 style = 'color: #FFFFFF' > {category.Name} </ h3 >"
                };
                Panel captionPanel = new Panel { CssClass = "carousel-caption" };
                captionPanel.Controls.Add(captionLabel);

                Panel itemPanel = new Panel { CssClass = "item" };
                itemPanel.Controls.Add(link);
                itemPanel.Controls.Add(captionPanel);

                categoryCarousel.Controls.Add(itemPanel);
            }
        }
开发者ID:KodKnackarGanget,项目名称:E-Handel,代码行数:30,代码来源:Home.aspx.cs


示例3: AddUpdatePanel

        private void AddUpdatePanel(Panel p)
        {
            this.messageLabel = new Label();

            this.updatePanel = new UpdatePanel();
            this.updatePanel.ID = "ScrudUpdatePanel";
            this.updatePanel.ChildrenAsTriggers = true;
            this.updatePanel.UpdateMode = UpdatePanelUpdateMode.Conditional;

            this.updatePanel.ContentTemplateContainer.Controls.Add(this.topCommandPanel.GetCommandPanel("top"));
            this.updatePanel.ContentTemplateContainer.Controls.Add(this.messageLabel);
            this.updatePanel.ContentTemplateContainer.Controls.Add(this.gridPanel);
            this.updatePanel.ContentTemplateContainer.Controls.Add(this.formPanel);
            this.updatePanel.ContentTemplateContainer.Controls.Add(this.bottomCommandPanel.GetCommandPanel("bottom"));

            //Bottom command panel.
            this.userIdHidden = new HiddenField();
            this.userIdHidden.ID = "UserIdHidden";
            this.userIdHidden.Value = this.UserId.ToString(CultureInfo.InvariantCulture);

            this.officeCodeHidden = new HiddenField();
            this.officeCodeHidden.ID = "OfficeCodeHidden";
            this.officeCodeHidden.Value = this.OfficeCode;

            this.updatePanel.ContentTemplateContainer.Controls.Add(this.userIdHidden);
            this.updatePanel.ContentTemplateContainer.Controls.Add(this.officeCodeHidden);
            p.Controls.Add(this.updatePanel);
        }
开发者ID:JonathanValle,项目名称:mixerp,代码行数:28,代码来源:UpdatePanel.cs


示例4: AddReportBody

        private void AddReportBody(Panel container)
        {
            this.reportBody = new Panel();
            this.reportBody.ID = "report";

            if (!this.NoHeader)
            {
                this.header = new ReportHeader();
                this.header.Path = ConfigurationHelper.GetReportParameter("HeaderPath");
                this.reportBody.Controls.Add(this.header);
            }

            this.reportTitleLiteral = new Literal();
            this.reportBody.Controls.Add(this.reportTitleLiteral);

            this.topSectionLiteral = new Literal();
            this.reportBody.Controls.Add(this.topSectionLiteral);

            this.bodyContentsLiteral = new Literal();
            this.reportBody.Controls.Add(this.bodyContentsLiteral);

            this.gridPlaceHolder = new PlaceHolder();
            this.reportBody.Controls.Add(this.gridPlaceHolder);

            this.bottomSectionLiteral = new Literal();
            this.reportBody.Controls.Add(this.bottomSectionLiteral);

            container.Controls.Add(this.reportBody);
        }
开发者ID:abinabrahamanchery,项目名称:mixerp,代码行数:29,代码来源:Body.cs


示例5: CreateControlInternal

        protected override WebControl CreateControlInternal(Control container)
        {
            var panel = new Panel();

            container.Controls.Add(panel);

            var skinLabel = new Label { Text = LocalizeString("Skin") };
            skinLabel.CssClass += "dnnFormSkinLabel";
            panel.Controls.Add(skinLabel);

            //_skinCombo = new DropDownList { ID = ID + "_SkinComboBox" };
            _skinCombo = new DnnComboBox { ID = ID + "_SkinComboBox" };
            _skinCombo.CssClass += "dnnFormSkinInput"; 
            _skinCombo.SelectedIndexChanged += SkinIndexChanged;
            panel.Controls.Add(_skinCombo);

            DnnFormComboBoxItem.BindListInternal(_skinCombo, _skinValue, GetSkins(SkinController.RootSkin), "Key", "Value");

            var containerLabel = new Label { Text = LocalizeString("Container") };
            containerLabel.CssClass += "dnnFormSkinLabel";
            panel.Controls.Add(containerLabel);

            //_containerCombo = new DropDownList { ID = ID + "_ContainerComboBox" };
            _containerCombo = new DnnComboBox { ID = ID + "_ContainerComboBox" };
            _containerCombo.CssClass += "dnnFormSkinInput";
            _containerCombo.SelectedIndexChanged += ContainerIndexChanged;
            panel.Controls.Add(_containerCombo);

            DnnFormComboBoxItem.BindListInternal(_containerCombo, _containerValue, GetSkins(SkinController.RootContainer), "Key", "Value");

            return panel;
        }
开发者ID:hungnt-me,项目名称:Dnn.Platform,代码行数:32,代码来源:DnnFormSkinsItem.cs


示例6: OnInit

        protected override void OnInit(EventArgs e)
        {
            _Panel = new Panel();
            _Panel.ID = this.ID + "_Container";
            _Panel.CssClass = "RibbonItems RibbonItems_SmallItem RibbonItemWithMenu";
            _Panel.Attributes.Add("ItemID", this.ID);
            if (this._width != null) _Panel.Style.Add("width", _width.ToString());
            this.Controls.Add(_Panel);

            _EnableState(this._enabled);

            if (!String.IsNullOrEmpty(this._tooltip))
            {
                _Panel.CssClass += " RibbonItemWithTooltip";
                _Panel.Attributes.Add("tooltip", this._tooltip);
            }

            Table lTable = new Table();
            lTable.Attributes.Add("align", "center");
            _Panel.Controls.Add(lTable);

            TableRow lTableRow = new TableRow();
            lTable.Controls.Add(lTableRow);

            TableCell lTableCell = new TableCell();
            lTableRow.Controls.Add(lTableCell);

            Image lImage = new Image();
            lImage.ImageUrl = (!String.IsNullOrEmpty(this._imageurl)) ? this._imageurl : Page.ClientScript.GetWebResourceUrl(this.GetType(), "OfficeWebUI.Resources.Common.Image.blank.gif");
            lImage.Width = 16;
            lImage.Height = 16;
            lTableCell.Controls.Add(lImage);

            TableCell lTableCellArrow = new TableCell();
            lTableRow.Controls.Add(lTableCellArrow);

            Image lArrow = new Image();
            lArrow.ImageUrl = Page.ClientScript.GetWebResourceUrl(this.GetType(), "OfficeWebUI.Resources.Common.Image.arrow_dr2.gif");
            lTableCellArrow.Controls.Add(lArrow);

            _DropDownMenu = new Panel();
            _DropDownMenu.ID = this.ID + "_Menu";
            _DropDownMenu.CssClass = "RibbonDropDownMenu";
            _DropDownMenu.Style.Add("display", "none");
            _Panel.Controls.Add(_DropDownMenu);

            foreach (Control lCtrl in this._items)
            {
                _DropDownMenu.Controls.Add(lCtrl);
            }

            /*
            lPanel.Attributes.Add("onclick", "OfficeWebUI.Ribbon.ShowMenu(this, '" + lDropDownMenu.ClientID + "')");
            lDropDownMenu.Attributes.Add("onmouseover", "OfficeWebUI.Ribbon.KeepMenu('" + lDropDownMenu.ClientID + "')");
            lDropDownMenu.Attributes.Add("onmouseout", "OfficeWebUI.Ribbon.HideMenu('" + lDropDownMenu.ClientID + "')");
            lDropDownMenu.Attributes.Add("MenuOpener", lPanel.ClientID);
            */

            base.OnInit(e);
        }
开发者ID:trankimhieu,项目名称:eCommerce-MVC,代码行数:60,代码来源:SmallItemDropDown.cs


示例7: LoadGridPanel

        private void LoadGridPanel(Panel gridPanel)
        {
            gridPanel.ID = "GridPanel";
            gridPanel.CssClass = this.GridPanelCssClass;
            gridPanel.Attributes.Add("style", "overflow:auto");
            gridPanel.Attributes.Add("padding", "4px");

            if (this.GridPanelHeight.Value > 0)
            {
                gridPanel.Height = this.GridPanelHeight;
            }

            if (this.GridPanelWidth.Value > 0)
            {
                gridPanel.Height = this.GridPanelWidth;
            }

            this.searchGridView = new MixERPGridView();
            this.searchGridView.ID = "SearchGridView";

            this.searchGridView.Attributes.Add("style", "white-space: nowrap;");
            this.searchGridView.GridLines = GridLines.None;
            this.searchGridView.CssClass = this.GridViewCssClass;
            this.searchGridView.PagerStyle.CssClass = this.GridViewPagerCssClass;
            this.searchGridView.RowStyle.CssClass = this.GridViewRowCssClass;
            this.searchGridView.AlternatingRowStyle.CssClass = this.GridViewAlternateRowCssClass;
            this.searchGridView.AutoGenerateColumns = true;
            this.searchGridView.RowDataBound += this.SearchGridView_RowDataBound;
            this.searchGridView.Columns.Add(GetSelectColumnTemplateField());

            gridPanel.Controls.Add(this.searchGridView);
        }
开发者ID:varcharli,项目名称:mixerp,代码行数:32,代码来源:ItemSelector.cs


示例8: Ini

 public override void Ini()
 {
     CssClass = "_devices";
     burnerList = new Dictionary<string, Devices>();
     burnerList = ((Bake)deviceList[name]).GetBurnerList();
     bakeOvenList = ((Bake)deviceList[name]).GetBakeOvenList();
     panelName = new Panel();
     panelName.CssClass = "_bakePanelName";
     labelName = new Label();
     labelName.Text = name;
     panelName.Controls.Add(labelName);
     buttonDelete = new Button();
     buttonDelete.Text = "X";
     buttonDelete.CssClass = "_buttonDelete";
     buttonDelete.Click += Delete_Click;
     Controls.Add(panelName);
     Controls.Add(buttonDelete);
     foreach (var burner in burnerList)
     {
         Controls.Add(((IDraw)burner.Value).Draw(burner.Key, burnerList));
     }
     foreach (var oven in bakeOvenList)
     {
         Controls.Add(((IDraw)oven.Value).Draw(oven.Key, bakeOvenList));
     }
 }
开发者ID:anatoliyshulika,项目名称:HomeWebForm,代码行数:26,代码来源:BakeDraw.cs


示例9: CreateControls

        private void CreateControls()
        {
            _panel = new Panel();
            _panel.CssClass = "panVolume";

            _image = new Image();
            _image.ImageUrl = "~/Images/sound_low.png";
            _image.CssClass = "imgBt";
            _panel.Controls.Add(_image);

            _imBtAdd = new ImageButton();
            _imBtAdd.ImageUrl = "~/Images/up_plus.png";
            _imBtAdd.CssClass = "imgBtV";
            _imBtAdd.Click += _imBtAdd_Click;
            _panel.Controls.Add(_imBtAdd);

            _volumeLabel = new Label();
            _volumeLabel.Text = ((IVolume)_data.Device).Volume.ToString();
            _volumeLabel.CssClass = "labelVolume";
            _panel.Controls.Add(_volumeLabel);

            _imBtDel = new ImageButton();
            _imBtDel.ImageUrl = "~/Images/down_minus.png";
            _imBtDel.CssClass = "imgBt imgBtV";
            _imBtDel.Click += _imBtDel_Click;
            _panel.Controls.Add(_imBtDel);

            Controls.Add(_panel);
        }
开发者ID:alermar69,项目名称:SmartHouseWebForms,代码行数:29,代码来源:VolumeContol.cs


示例10: ShowPanelPage

        public void ShowPanelPage(Panel _panel)
        {
            try
            {
                if (Request.QueryString["page"] != null)
                {
                    if (Session["page"] != null)
                    {
                        if (!Session["page"].Equals(Request.QueryString["page"]))
                        {
                            _panel.Visible = true;
                        }
                        else
                        {
                            _panel.Visible = false;
                        }
                    }

                    Session["page"] = Request.QueryString["page"];
                }
                else
                {
                    Session["page"] = 1;
                }
            }
            catch (Exception)
            {

            }
        }
开发者ID:quocdunginfo,项目名称:QuanLyTaiSan,代码行数:30,代码来源:ucCollectionPager.ascx.cs


示例11: GenerateShopControls

        //Fill page with dynamic controls showing products in database
        private void GenerateShopControls()
        {
            ArrayList coffeeList = ConnectionClass.GetCoffeeByType("%");

            foreach (Coffee coffee in coffeeList)
            {
                //Create Controls
                Panel coffeePanel = new Panel();
                Image image = new Image { ImageUrl = coffee.Image, CssClass = "ProductsImage" };
                Literal literal = new Literal { Text = "<br />" };
                Literal literal2 = new Literal { Text = "<br />" };
                Label lblName = new Label { Text = coffee.Name, CssClass = "ProductsName" };
                Label lblPrice = new Label { Text = String.Format("{0:0.00}",coffee.Price) + "<br />", CssClass = "ProductsPrice" };
                TextBox textBox = new TextBox {ID = coffee.Id.ToString(), CssClass = "ProductsTextBox", Text = "0", Width = 60};

                //Add validation so only numbers can be entered into the textfields
                var validator = new RegularExpressionValidator
                                    {
                                        ValidationExpression = "^[0-9]*",
                                        ControlToValidate = textBox.ID,
                                        ErrorMessage = "Please enter a number."
                                    };

                //Add controls to Panels
                coffeePanel.Controls.Add(image);
                coffeePanel.Controls.Add(literal);
                coffeePanel.Controls.Add(lblName);
                coffeePanel.Controls.Add(literal2);
                coffeePanel.Controls.Add(lblPrice);
                coffeePanel.Controls.Add(textBox);
                coffeePanel.Controls.Add(validator);

                pnlProducts.Controls.Add(coffeePanel);
            }
        }
开发者ID:kgrabek,项目名称:WebApp,代码行数:36,代码来源:Shop.aspx.cs


示例12: LoadGridPanel

        private void LoadGridPanel(Panel gridPanel)
        {
            gridPanel.ID = "GridPanel";
            gridPanel.ScrollBars = ScrollBars.Auto;
            gridPanel.CssClass = this.GridPanelCssClass;

            if (this.GridPanelHeight != null)
            {
                gridPanel.Height = this.GridPanelHeight;
            }

            if (this.GridPanelWidth != null)
            {
                gridPanel.Height = this.GridPanelWidth;
            }

            searchGridView = new GridView();
            searchGridView.ID = "SearchGridView";
            searchGridView.GridLines = GridLines.None;
            searchGridView.CssClass = this.GridViewCssClass;
            searchGridView.PagerStyle.CssClass = this.GridViewPagerCssClass;
            searchGridView.RowStyle.CssClass = this.GridViewRowCssClass;
            searchGridView.AlternatingRowStyle.CssClass = this.GridViewAlternateRowCssClass;
            searchGridView.AutoGenerateColumns = true;
            searchGridView.RowDataBound += this.SearchGridView_RowDataBound;
            searchGridView.Columns.Add(this.GetSelectColumnTemplateField());

            gridPanel.Controls.Add(searchGridView);
        }
开发者ID:hadoan,项目名称:mixerp,代码行数:29,代码来源:ItemSelector.cs


示例13: AddEmailAnchor

 private void AddEmailAnchor(Panel p)
 {
     emailAnchor = new HtmlAnchor();
     emailAnchor.ID = "SendEmailAnchor";
     emailAnchor.InnerHtml = "<img src='" + this.Page.ResolveUrl(MixERP.Net.Common.Helpers.ConfigurationHelper.GetReportParameter("EmailIcon")) + "' />";
     p.Controls.Add(emailAnchor);
 }
开发者ID:n4gava,项目名称:mixerp,代码行数:7,代码来源:CommandPanel.cs


示例14: renderSimilarProduct

        private Panel renderSimilarProduct(Item item)
        {
            Panel similarProductsItemContainer = new Panel();
            similarProductsItemContainer.CssClass = "SimilarProductsItemContainer";
            Table table = new Table();
            TableRow tableRow = new TableRow();

            TableCell tableCell = new TableCell();
            Panel itemImageBg = new Panel();
            itemImageBg.CssClass = "itemImageBg";
            Image image = new Image();
            image.ImageUrl = item.ImageUrl;

            itemImageBg.Controls.Add(image);
            tableCell.Controls.Add(itemImageBg);
            tableRow.Controls.Add(tableCell);

            tableCell = new TableCell();
            Panel itemImageTitle = new Panel();
            itemImageTitle.CssClass = "itemImageTitle";
            Label label = new Label();
            label.Text = item.Title;
            itemImageTitle.Controls.Add(label);
            tableCell.Controls.Add(itemImageTitle);
            tableRow.Controls.Add(tableCell);

            table.Controls.Add(tableRow);
            similarProductsItemContainer.Controls.Add(table);

            return similarProductsItemContainer;
        }
开发者ID:MYMMoonDT,项目名称:Vneed,代码行数:31,代码来源:SimilarProductsControl.ascx.cs


示例15: BuildCategoryPanel

        public static Panel BuildCategoryPanel(BlogEntry entry)
        {
            Panel categoriesPanel = new Panel();
            categoriesPanel.CssClass = "blogPostLabel";
            categoriesPanel.Style.Add(HtmlTextWriterStyle.TextAlign, "right");

            if (entry.Categories.Count > 0)
            {
                String category = entry.Categories[0];
                HyperLink hyperLink = new HyperLink();
                hyperLink.NavigateUrl = "blog.aspx?label=" + category;
                hyperLink.Text = category;
                categoriesPanel.Controls.Add(hyperLink);
            }

            for (int i = 1; i < entry.Categories.Count; i++)
            {
                String category = entry.Categories[i];
                Literal labelSeparator = new Literal();
                labelSeparator.Text = ", ";
                categoriesPanel.Controls.Add(labelSeparator);

                HyperLink hyperLink = new HyperLink();
                hyperLink.NavigateUrl = "blog.aspx?label=" + category;
                hyperLink.Text = category;
                categoriesPanel.Controls.Add(hyperLink);
            }

            return categoriesPanel;
        }
开发者ID:Letractively,项目名称:rpcwc,代码行数:30,代码来源:BlogHelper.cs


示例16: BuildContentsControl

        private static WebControl BuildContentsControl(BlogEntry entry)
        {
            Panel contentsControl = new Panel();
            WebControl textControl = new WebControl(HtmlTextWriterTag.P);
            textControl.Controls.Add(new LiteralControl(entry.Content));
            contentsControl.Controls.Add(textControl);

            if (entry.Enclosure != null && entry.Enclosure.Uri != null)
            {
                HtmlGenericControl audio = new HtmlGenericControl("audio");
                audio.Attributes.Add("controls", "controls");
                audio.Attributes.Add("src", entry.Enclosure.Uri);
                audio.Attributes.Add("type", "audio/mp3");

                WebControl musicPlayer = new WebControl(HtmlTextWriterTag.Embed);
                musicPlayer.ID = "musicPlayer_" + entry.id;
                musicPlayer.Style.Add(HtmlTextWriterStyle.Width, "400px");
                musicPlayer.Style.Add(HtmlTextWriterStyle.Height, "27px");
                musicPlayer.Style.Add("border", "1px solid rgb(170, 170, 170)");
                musicPlayer.Attributes.Add("src", "http://www.google.com/reader/ui/3523697345-audio-player.swf");
                musicPlayer.Attributes.Add("flashvars", "audioUrl=" + entry.Enclosure.Uri);
                musicPlayer.Attributes.Add("pluginspage", "http://www.macromedia.com/go/getflashplayer");

                audio.Controls.Add(musicPlayer);

                contentsControl.Controls.Add(audio);
            }

            return contentsControl;
        }
开发者ID:Letractively,项目名称:rpcwc,代码行数:30,代码来源:BlogHelper.cs


示例17: LoadResults

        public void LoadResults(
            DataTable dataSource,
            Panel panel,
            HtmlGenericControl div,
            Panel tileResultsPanel,
            Panel gridResultsPanel,
            RadGrid grid,
            string resultType,
            string contentTemplate)
        {
            if (resultType == "Grid")
            {
                grid.DataSource = dataSource;
                grid.DataBind();

                tileResultsPanel.Visible = false;
                gridResultsPanel.Visible = true;
            }
            else
            {
                var resultsControl = new Controls.DynamicTileContainer(4, 113, 525, false);
                resultsControl.DataSource = null;
                resultsControl.ContentTileTemplate = contentTemplate;
                resultsControl.DataSource = dataSource;
                resultsControl.DataBind();

                tileResultsPanel.Visible = true;
                gridResultsPanel.Visible = false;

                div.Controls.Clear();
                div.Controls.Add(resultsControl);

                AddNavigationButtons(panel, div);
            }
        }
开发者ID:ezimaxtechnologies,项目名称:ASP.Net,代码行数:35,代码来源:ExpandedSearchPage.cs


示例18: AddLastValueHiddenField

 private void AddLastValueHiddenField(Panel p)
 {
     this.lastValueHiddenTextBox = new TextBox();
     this.lastValueHiddenTextBox.ID = "LastValueHidden";
     this.lastValueHiddenTextBox.Style.Add("display", "none;");
     p.Controls.Add(this.lastValueHiddenTextBox);
 }
开发者ID:njmube,项目名称:mixerp,代码行数:7,代码来源:GridPanel.cs


示例19: CreateRotatorNavigationButtons

        private void CreateRotatorNavigationButtons(Panel panel, HtmlGenericControl div, int divIndex)
        {
            panel.Controls.Clear();

            double pages = div.Controls[0].Controls[0].Controls.Count / 6.0; //6 is the number of columns
            pages = Math.Ceiling(pages);

            div.Style["Width"] = (pages * 738) + "px";

            if (pages > 1)
            {
                LinkButton linkButton = CreatePreviousButton(divIndex);
                panel.Controls.Add(linkButton);
            }

            for (int i = 1; i <= pages; i++)
            {
                LinkButton linkButton = CreateLinkButton(i, divIndex);
                panel.Controls.Add(linkButton);
            }

            if (pages > 1)
            {
                LinkButton linkButton = CreateNextButton(divIndex);
                panel.Controls.Add(linkButton);
            }
        }
开发者ID:ezimaxtechnologies,项目名称:ASP.Net,代码行数:27,代码来源:ExpandedSearchPage.cs


示例20: DataEditorControls

        public override Control DataEditorControls(XmlNode xml, Dictionary<string, object> properties)
        {
            //properties should be multiType properties ie. Name, Description, Mandatory, Validation
            Panel pnlDataEditor = new Panel();

            Label lblDataEditor = new Label() { Text = properties["Name"].ToString() };
            Literal litDescription = new Literal() { Text = properties["Description"].ToString() };

            dtpDataEditor = new umbraco.uicontrols.DatePicker.DateTimePicker();

            if (properties.ContainsKey("ShowTime"))
            {
                boolShowTime = bool.Parse(properties["ShowTime"].ToString());
                dtpDataEditor.ShowTime = boolShowTime;
            }

            if (xml != null)
            {
                //Anything special about the xml? no - just do innertext
                dtpDataEditor.DateTime = Convert.ToDateTime(xml.InnerText);
            }
            
            pnlDataEditor.Controls.Add(lblDataEditor);
            pnlDataEditor.Controls.Add(litDescription);
            pnlDataEditor.Controls.Add(dtpDataEditor);

            if (xml != null)
            {
                //Anything special about the xml? no - just do innertext
                dtpDataEditor.DateTime = Convert.ToDateTime(xml.InnerText);
            }

            return pnlDataEditor;
        }
开发者ID:benaghaeipour,项目名称:4Ben.DataTypes.MultiType.PropertyTypes,代码行数:34,代码来源:MultiType_DateTimePicker.cs



注:本文中的System.Web.UI.WebControls.Panel类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# WebControls.Parameter类代码示例发布时间:2022-05-26
下一篇:
C# WebControls.PagedDataSource类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap