当前位置: 首页>>代码示例>>C#>>正文


C# TableCell.FindControl方法代码示例

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


在下文中一共展示了TableCell.FindControl方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateSideBar

		void CreateSideBar (TableCell sideBarCell)
		{
			RegisterApplyStyle (sideBarCell, SideBarStyle);

			if (SkipLinkText != "") {
				System.Web.UI.HtmlControls.HtmlAnchor anchor = new System.Web.UI.HtmlControls.HtmlAnchor ();
				anchor.HRef = "#" + ClientID + "_SkipLink";

				Image img = new Image ();
				ClientScriptManager csm = new ClientScriptManager (null);
				img.ImageUrl = csm.GetWebResourceUrl (typeof (SiteMapPath), "transparent.gif");
				img.Attributes.Add ("height", "0");
				img.Attributes.Add ("width", "0");
				img.AlternateText = SkipLinkText;

				anchor.Controls.Add (img);
				sideBarCell.Controls.Add (anchor);
			}

			if (sideBarTemplate != null) {
				sideBarTemplate.InstantiateIn (sideBarCell);
				stepDatalist = sideBarCell.FindControl (DataListID) as DataList;
				if (stepDatalist == null)
					throw new InvalidOperationException ("The side bar template must contain a DataList control with id '" + DataListID + "'.");
				stepDatalist.ItemDataBound += new DataListItemEventHandler(StepDatalistItemDataBound);
			} else {
				stepDatalist = new DataList ();
				stepDatalist.ID = DataListID;
				stepDatalist.SelectedItemStyle.Font.Bold = true;
				stepDatalist.ItemTemplate = SideBarItemTemplate;
				sideBarCell.Controls.Add (stepDatalist);
			}

			if (SkipLinkText != "") {
				System.Web.UI.HtmlControls.HtmlAnchor anchor = new System.Web.UI.HtmlControls.HtmlAnchor ();
				anchor.ID = "SkipLink";
				sideBarCell.Controls.Add (anchor);
			}

			stepDatalist.ItemCommand += new DataListCommandEventHandler (StepDatalistItemCommand);
			stepDatalist.CellSpacing = 0;
			stepDatalist.DataSource = WizardSteps;
			stepDatalist.SelectedIndex = ActiveStepIndex;
			stepDatalist.DataBind ();
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:45,代码来源:Wizard.cs

示例2: CreateSideBar

		void CreateSideBar (TableCell sideBarCell)
		{
			RegisterApplyStyle (sideBarCell, SideBarStyle);
			
			if (sideBarTemplate != null) {
				sideBarTemplate.InstantiateIn (sideBarCell);
				stepDatalist = sideBarCell.FindControl (DataListID) as DataList;
				if (stepDatalist == null)
					throw new InvalidOperationException ("The side bar template must contain a DataList control with id '" + DataListID + "'.");
			} else {
				stepDatalist = new DataList ();
				stepDatalist.ID = DataListID;
				sideBarCell.Controls.Add (stepDatalist);
			}

			stepDatalist.DataSource = WizardSteps;
			stepDatalist.ItemTemplate = sideBarItemTemplate;
			stepDatalist.DataBind ();
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:19,代码来源:Wizard.cs

示例3: GetValue

		/// <summary>
		/// Gets the current value of the specified <see cref="TableCell"/> object.
		/// </summary>
		/// <param name="cell">The current <see cref="TableCell"/> object.</param>
		/// <param name="controlId">The nested control's ID property value.</param>
		/// <param name="controlProperty">The nested control's value property name.</param>
		/// <returns>The current value.</returns>
		public Object GetValue(TableCell cell, String controlId, String controlProperty)
		{
			Object value = null;

			if ( String.IsNullOrEmpty(controlId) )
			{
				value = cell.Text;
			}
			else
			{
				Control control = cell.FindControl(controlId);
				value = FormUtil.GetValue(control, controlProperty);
			}

			return value;
		}
开发者ID:WildGenie,项目名称:NetTiers,代码行数:23,代码来源:EntityRelationshipMember.cs

示例4: AddTemplateCell

		void AddTemplateCell (TableRow row, ITemplate template, params string[] buttonIds)
		{
			TableCell cell = new TableCell ();
			template.InstantiateIn (cell);
			
			foreach (string id in buttonIds) {
				IButtonControl b = cell.FindControl (id) as IButtonControl;
				if (b != null) RegisterCommandEvents (b);
			}
			
			row.Cells.Add (cell);
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:12,代码来源:Wizard.cs

示例5: SetValue

		/// <summary>
		/// Sets the current value of the specified <see cref="TableCell"/> object.
		/// </summary>
		/// <param name="cell">The current <see cref="TableCell"/> object.</param>
		/// <param name="controlId">The nested control's ID property value.</param>
		/// <param name="controlProperty">The nested control's value property name.</param>
		/// <param name="value">The current value.</param>
		public void SetValue(TableCell cell, String controlId, String controlProperty, Object value)
		{
			if ( cell != null )
			{
				if ( String.IsNullOrEmpty(controlId) )
				{
					cell.Text = String.Format("{0}", value);
				}
				else
				{
					Control control = cell.FindControl(controlId);
					FormUtil.SetValue(control, controlProperty, value);
				}
			}
		}
开发者ID:WildGenie,项目名称:NetTiers,代码行数:22,代码来源:EntityRelationshipMember.cs


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