本文整理汇总了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();
}
}
}
}
示例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();
}
示例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();
}
示例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();
}
}
示例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();
}
示例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();
}
示例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();
}
示例8: Render
protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
writer.AddAttribute("class", CssClass);
writer.RenderBeginTag("div");
base.Render(writer);
writer.RenderEndTag();
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}
}
示例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();
}
示例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();
}
示例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();
}