本文整理汇总了C#中System.Web.UI.WebControls.Label.RenderEndTag方法的典型用法代码示例。如果您正苦于以下问题:C# Label.RenderEndTag方法的具体用法?C# Label.RenderEndTag怎么用?C# Label.RenderEndTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.UI.WebControls.Label
的用法示例。
在下文中一共展示了Label.RenderEndTag方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RenderNodeIcon
/// -----------------------------------------------------------------------------
/// <summary>
///
/// </summary>
/// <param name="writer"></param>
/// <remarks>
/// </remarks>
/// <history>
/// [jhenning] 9/21/2005 Created
/// </history>
/// -----------------------------------------------------------------------------
protected void RenderNodeIcon(HtmlTextWriter writer)
{
Label oSpan = new Label();
if (!String.IsNullOrEmpty(m_objNode.CSSIcon))
{
oSpan.CssClass = m_objNode.CSSIcon;
}
else if (!String.IsNullOrEmpty(m_objNode.DNNMenu.DefaultIconCssClass)) {
oSpan.CssClass = m_objNode.DNNMenu.DefaultIconCssClass;
}
oSpan.RenderBeginTag(writer);
if (m_objNode.ImageIndex > -1)
{
NodeImage m_objNodeImage = m_objNode.DNNMenu.ImageList[m_objNode.ImageIndex];
if ((m_objNodeImage != null))
{
Image objImage = new Image();
objImage.ImageUrl = m_objNodeImage.ImageUrl;
objImage.RenderControl(writer);
writer.Write(" ");
}
}
oSpan.RenderEndTag(writer);
}
示例2: RenderNodeArrow
protected void RenderNodeArrow(HtmlTextWriter writer)
{
if (m_objNode.HasNodes)
{
Label oSpan = new Label();
oSpan.RenderBeginTag(writer);
if (m_objNode.Level == 0)
{
if (!String.IsNullOrEmpty(m_objNode.DNNMenu.RootArrowImage))
{
Image objImage = new Image();
objImage.ImageUrl = m_objNode.DNNMenu.RootArrowImage;
objImage.RenderControl(writer);
}
}
else
{
if (!String.IsNullOrEmpty(m_objNode.DNNMenu.ChildArrowImage))
{
Image objImage = new Image();
objImage.ImageUrl = m_objNode.DNNMenu.ChildArrowImage;
objImage.RenderControl(writer);
}
}
oSpan.RenderEndTag(writer);
}
}
示例3: RenderNodeIcon
/// <summary>
///
/// </summary>
/// <param name="writer"></param>
/// <remarks>
/// </remarks>
/// <history>
/// [jbrinkman] 5/6/2004 Created
/// </history>
protected void RenderNodeIcon( HtmlTextWriter writer )
{
Label oSpan = new Label();
if( _Node.CSSIcon.Length > 0 )
{
oSpan.CssClass = _Node.CSSIcon;
}
else if( _Node.DNNTree.DefaultIconCssClass.Length > 0 )
{
oSpan.CssClass = _Node.DNNTree.DefaultIconCssClass;
}
oSpan.RenderBeginTag( writer );
if( _Node.ImageIndex > -1 )
{
NodeImage _NodeImage = _Node.DNNTree.ImageList[_Node.ImageIndex];
if( !( _NodeImage == null ) )
{
Image _image = new Image();
_image.ImageUrl = _NodeImage.ImageUrl;
_image.RenderControl( writer );
writer.Write( " ", null );
}
}
oSpan.RenderEndTag( writer );
}