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


C# TableItemStyle.AddAttributesToRender方法代码示例

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


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

示例1: RenderCalendarHeaderCell

 private void RenderCalendarHeaderCell(HtmlTextWriter writer, TableItemStyle style, string text, string abbrText)
 {
     style.AddAttributesToRender(writer, this);
     writer.AddAttribute("abbr", abbrText);
     writer.AddAttribute("scope", "col");
     writer.RenderBeginTag(HtmlTextWriterTag.Th);
     writer.Write(text);
     writer.RenderEndTag();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:Calendar.cs

示例2: AddAttributesToRender_Null_WebControl

		public void AddAttributesToRender_Null_WebControl ()
		{
			TableItemStyle tis = new TableItemStyle ();
			tis.AddAttributesToRender (null, new TableRow ());
			// no exception
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:6,代码来源:TableItemStyleTest.cs

示例3: RenderCalendarCell

 private void RenderCalendarCell(HtmlTextWriter writer, TableItemStyle style, string text, string title, bool hasButton, string eventArgument)
 {
     style.AddAttributesToRender(writer, this);
     writer.RenderBeginTag(HtmlTextWriterTag.Td);
     if (hasButton)
     {
         Color foreColor = style.ForeColor;
         writer.Write("<a href=\"");
         writer.Write(this.Page.ClientScript.GetPostBackClientHyperlink(this, eventArgument, true));
         writer.Write("\" style=\"color:");
         writer.Write(foreColor.IsEmpty ? this.defaultButtonColorText : ColorTranslator.ToHtml(foreColor));
         if (!string.IsNullOrEmpty(title))
         {
             writer.Write("\" title=\"");
             writer.Write(title);
         }
         writer.Write("\">");
         writer.Write(text);
         writer.Write("</a>");
     }
     else
     {
         writer.Write(text);
     }
     writer.RenderEndTag();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:26,代码来源:Calendar.cs

示例4: RenderCalendarCell

        private void RenderCalendarCell(HtmlTextWriter writer, TableItemStyle style, string text, string title, bool hasButton, string eventArgument) {
            style.AddAttributesToRender(writer, this);
            writer.RenderBeginTag(HtmlTextWriterTag.Td);

            if (hasButton) {

                // render the button
                Color foreColor = style.ForeColor;
                writer.Write("<a href=\"");
                writer.Write(Page.ClientScript.GetPostBackClientHyperlink(this, eventArgument, true));

                // ForeColor needs to go on the actual link. This breaks the uplevel/downlevel rules a little bit,
                // but it is worth doing so the day links do not change color when they go in the history on
                // downlevel browsers. Otherwise, people get it confused with the selection mechanism.
                writer.Write("\" style=\"color:");
                writer.Write(foreColor.IsEmpty ? defaultButtonColorText : ColorTranslator.ToHtml(foreColor));

                if (!String.IsNullOrEmpty(title)) {
                    writer.Write("\" title=\"");
                    writer.Write(title);
                }

                writer.Write("\">");
                writer.Write(text);
                writer.Write("</a>");
            }
            else {
                writer.Write(text);
            }

            writer.RenderEndTag();
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:32,代码来源:Calendar.cs


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