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


C# System.RenderEndTag方法代码示例

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


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

示例1: Render

        protected override void Render(System.Web.UI.HtmlTextWriter output)
        {
            var searchLinkManager = new SearchLinkManager();
            int pages = Total / PageSize;

            if (Total % PageSize > 0)
            {
                pages = pages + 1;
            }

            if (pages > 1)
            {

                for (int i = 1; i <= pages; i++)
                {
                    output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Class, "searchPagination");

                    if (i != Page)
                    {
                        output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Href, searchLinkManager.GetPageLink(i));
                        output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.A);
                        output.WriteLine(i.ToString());
                        output.RenderEndTag();
                    }
                    else
                    {
                        output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Span);
                        output.WriteLine(i.ToString());
                        output.RenderEndTag();
                    }
                }
            }
        }
开发者ID:hainguyen4c,项目名称:BasicSitecoreSample,代码行数:33,代码来源:Paginator.cs

示例2: RenderEditMode

 protected override void RenderEditMode(System.Web.UI.HtmlTextWriter writer)
 {
     List<PackageType> packageTypes = PackageController.GetPackageTypes();
     ControlStyle.AddAttributesToRender(writer);
     writer.AddAttribute(HtmlTextWriterAttribute.Type, "text");
     writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID);
     writer.RenderBeginTag(HtmlTextWriterTag.Select);
     writer.AddAttribute(HtmlTextWriterAttribute.Value, Null.NullString);
     if (StringValue == Null.NullString)
     {
         writer.AddAttribute(HtmlTextWriterAttribute.Selected, "selected");
     }
     writer.RenderBeginTag(HtmlTextWriterTag.Option);
     writer.Write("<" + Localization.Localization.GetString("Not_Specified", Localization.Localization.SharedResourceFile) + ">");
     writer.RenderEndTag();
     foreach (PackageType type in packageTypes)
     {
         writer.AddAttribute(HtmlTextWriterAttribute.Value, type.Type);
         if (type.Type == StringValue)
         {
             writer.AddAttribute(HtmlTextWriterAttribute.Selected, "selected");
         }
         writer.RenderBeginTag(HtmlTextWriterTag.Option);
         writer.Write(type.Type);
         writer.RenderEndTag();
     }
     writer.RenderEndTag();
 }
开发者ID:jackiechou,项目名称:thegioicuaban.com,代码行数:28,代码来源:PackageTypeEditControl.cs

示例3: Render

 protected override void Render(System.Web.UI.HtmlTextWriter writer)
 {
     if (null == data)
     {
         return;
     }
     writer.RenderBeginTag(HtmlTextWriterTag.Div);
     writer.AddAttribute(HtmlTextWriterAttribute.Src, data.Url);
     writer.RenderBeginTag(HtmlTextWriterTag.Img);
     writer.RenderEndTag();
     base.Render(writer);
     writer.RenderEndTag();
 }
开发者ID:davidajulio,项目名称:hx,代码行数:13,代码来源:CaptchaValidator.cs

示例4: Render

        /// <summary>
        /// Renders the specified writer.
        /// </summary>
        /// <param name="writer">The writer.</param>
        public override void Render( System.Web.UI.HtmlTextWriter writer )
        {
            if ( Person != null )
            {
                writer.AddAttribute( HtmlTextWriterAttribute.Class, "badge" );
                writer.AddAttribute( HtmlTextWriterAttribute.Title, GetToolTipText( Person ) );
                writer.RenderBeginTag( HtmlTextWriterTag.Div );

                writer.AddAttribute( HtmlTextWriterAttribute.Src, GetIconPath( Person ) );
                writer.RenderBeginTag( HtmlTextWriterTag.Img );
                writer.RenderEndTag();

                writer.RenderEndTag();
            }
        }
开发者ID:pkdevbox,项目名称:Rock,代码行数:19,代码来源:IconBadge.cs

示例5: RenderEditMode

 protected override void RenderEditMode(System.Web.UI.HtmlTextWriter writer)
 {
     int length = Null.NullInteger;
     if ((CustomAttributes != null))
     {
         foreach (System.Attribute attribute in CustomAttributes)
         {
             if (attribute is MaxLengthAttribute)
             {
                 MaxLengthAttribute lengthAtt = (MaxLengthAttribute)attribute;
                 length = lengthAtt.Length;
                 break;
             }
         }
     }
     ControlStyle.AddAttributesToRender(writer);
     writer.AddAttribute(HtmlTextWriterAttribute.Type, "text");
     writer.AddAttribute(HtmlTextWriterAttribute.Value, StringValue);
     if (length > Null.NullInteger)
     {
         writer.AddAttribute(HtmlTextWriterAttribute.Maxlength, length.ToString());
     }
     writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID);
     writer.RenderBeginTag(HtmlTextWriterTag.Input);
     writer.RenderEndTag();
 }
开发者ID:jackiechou,项目名称:thegioicuaban.com,代码行数:26,代码来源:TextEditControl.cs

示例6: RenderHeader

 public override void RenderHeader(System.Web.UI.HtmlTextWriter writer)
 {
     writer.AddAttribute("src", ResolveUrl(ScriptUrl ?? ""));
     writer.AddAttribute("type", Type ?? "text/javascript");
     writer.RenderBeginTag("script");
     writer.RenderEndTag();
 }
开发者ID:mm201,项目名称:squidtracker,代码行数:7,代码来源:RequireScript.cs

示例7: RenderHeader

 public override void RenderHeader(System.Web.UI.HtmlTextWriter writer)
 {
     writer.AddAttribute("rel", "stylesheet");
     writer.AddAttribute("href", ResolveUrl(CssUrl ?? ""));
     writer.AddAttribute("type", "text/css");
     writer.RenderBeginTag("link");
     writer.RenderEndTag();
 }
开发者ID:mm201,项目名称:squidtracker,代码行数:8,代码来源:RequireCss.cs

示例8: Render

        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            writer.AddAttribute("class", CssClass);
            writer.RenderBeginTag("div");

            base.Render(writer);

            writer.RenderEndTag();
        }
开发者ID:skyquery,项目名称:graywulf,代码行数:9,代码来源:ListViewDataPager.cs

示例9: Render

        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            AddAttributesToRender(writer);
            writer.AddAttribute("class", String.Format("docking-{0}", DockingStyle.ToString().ToLowerInvariant()));
            writer.RenderBeginTag("div");

            base.Render(writer);

            writer.RenderEndTag();
        }
开发者ID:skyquery,项目名称:graywulf,代码行数:10,代码来源:DockingPanel.cs

示例10: Render

        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            base.Render(writer);

            Writer = writer;
            WriteTitle("WSFederationAuthenticationModule Information");

            writer.RenderBeginTag(HtmlTextWriterTag.Dl);
            for (Int32 i = 0; i != controls.Length; ++i)
                RenderListEntry(names[i], controls[i]);
            writer.RenderEndTag();
        }
开发者ID:davidajulio,项目名称:claims,代码行数:12,代码来源:FamInfo.cs

示例11: Render

        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            AddAttributesToRender(writer);

            writer.AddStyleAttribute("background-color", GetStatusBackColor());
            writer.AddStyleAttribute("color", GetStatusForeColor());

            writer.RenderBeginTag("span");

            writer.Write(status.ToString().ToLower());

            writer.RenderEndTag();
        }
开发者ID:skyquery,项目名称:graywulf,代码行数:13,代码来源:JobStatus.cs

示例12: Render

 protected override void Render(System.Web.UI.HtmlTextWriter writer)
 {
     if (!this.DesignMode)
     {
         EFClientTools.ClientUtility.ClientInfo.cErrorCode = 8270;
         writer.AddAttribute(HtmlTextWriterAttribute.Id, this.ID);
         writer.AddAttribute(HtmlTextWriterAttribute.Type, "text");
         writer.AddAttribute(HtmlTextWriterAttribute.Class, JQControl.NumberBox);
         writer.AddAttribute(JQProperty.DataOptions, this.DataOptions);
         writer.RenderBeginTag(HtmlTextWriterTag.Input);
         writer.RenderEndTag();
         EFClientTools.ClientUtility.ClientInfo.cErrorCode = 0;
     }
 }
开发者ID:san90279,项目名称:UK_OAS,代码行数:14,代码来源:JQNumberBox.cs

示例13: Render

 protected override void Render(System.Web.UI.HtmlTextWriter writer)
 {
     string strText = this.Text;
     int intLenCol = Convert.ToInt32(this.Width.Value);
     int intLenText = this.Text.Length;
     if (intLenText > intLenCol)
     {
         strText = strText.Substring(0, intLenCol) + "...";
         writer.AddAttribute("title", this.Text);
     }
     writer.AddAttribute("class", this.CssClass);
     writer.RenderBeginTag(HtmlTextWriterTag.Span);
     writer.Write(strText);
     writer.RenderEndTag();
 }
开发者ID:kiquenet,项目名称:B4F,代码行数:15,代码来源:TruncLabel.cs

示例14: Render

        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            double sum = 0;

            for (int i = 0; i < values.Count; i++)
            {
                sum += values[i];
            }

            AddAttributesToRender(writer);
            writer.RenderBeginTag("table");
            writer.RenderBeginTag("tr");

            for (int i = 0; i < values.Count; i++)
            {
                writer.AddStyleAttribute("width", String.Format("{0}%", (int)Math.Round(values[i] / sum * 100)));

                writer.RenderBeginTag("td");
                writer.RenderEndTag();
            }

            writer.RenderEndTag();
            writer.RenderEndTag();
        }
开发者ID:skyquery,项目名称:graywulf,代码行数:24,代码来源:UsageBar.cs

示例15: Render

 protected override void Render(System.Web.UI.HtmlTextWriter writer)
 {
     string text = Regex.Replace(LongText, @"\s+", " ");
     string compactText = text;
     if (MaxLength < 4 || text.Length <= MaxLength)
         writer.AddAttribute("title", PermanentToolTip);
     else
     {
         compactText = text.Substring(0, MaxLength - 3) + "...";
         writer.AddAttribute("title", text + (string.IsNullOrEmpty(PermanentToolTip) ? "" : " -> " + PermanentToolTip));
     }
     writer.AddAttribute("class", this.CssClass);
     writer.RenderBeginTag(HtmlTextWriterTag.Span);
     writer.Write(compactText);
     writer.RenderEndTag();
 }
开发者ID:kiquenet,项目名称:B4F,代码行数:16,代码来源:TruncLabel2.cs


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