本文整理汇总了C#中TextBox.RenderControl方法的典型用法代码示例。如果您正苦于以下问题:C# TextBox.RenderControl方法的具体用法?C# TextBox.RenderControl怎么用?C# TextBox.RenderControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextBox
的用法示例。
在下文中一共展示了TextBox.RenderControl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadFinding
private void LoadFinding(string text)
{
System.IO.StringWriter stringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlTextWriter = new System.Web.UI.HtmlTextWriter(stringWriter);
string heading = "";
string description = "";
string impression = "";
try
{
XmlDocument xDoc = new XmlDocument();
xDoc.LoadXml(text);
heading = xDoc.ChildNodes[0].ChildNodes[0].InnerText;
description = xDoc.ChildNodes[0].ChildNodes[1].InnerText;
impression = xDoc.ChildNodes[0].ChildNodes[2].InnerText;
}
catch (Exception ex)
{
description = text;
}
TextBox headingTB = new TextBox();
headingTB.Text = heading;
headingTB.Width = Unit.Pixel(580);
headingTB.ID = "headingTextBox";
htmlTextWriter.Write("<div><span style='display:inline-block;width:100px;'><b>Heading:</b></span>");
headingTB.RenderControl(htmlTextWriter);
htmlTextWriter.Write("</div>");
TextBox descTB = new TextBox();
descTB.TextMode = TextBoxMode.MultiLine;
descTB.Rows = 10;
descTB.Width = Unit.Pixel(680);
descTB.Text = description;
descTB.ID = "descriptionTextBox";
htmlTextWriter.Write("<div><span style='display:inline-block;width:75px;'><b>Description:</b></span></div><div>");
descTB.RenderControl(htmlTextWriter);
htmlTextWriter.Write("</div>");
TextBox impTB = new TextBox();
impTB.TextMode = TextBoxMode.MultiLine;
impTB.Rows = 3;
impTB.Text = impression;
impTB.Width = Unit.Pixel(680);
impTB.ID = "impressionTextBox";
htmlTextWriter.Write("<div><span style='display:inline-block;width:100px;'><b>Impression:</b></span></div><div>");
impTB.RenderControl(htmlTextWriter);
htmlTextWriter.Write("</div>");
Response.Write(htmlTextWriter.InnerWriter);
Response.End();
}
示例2: GetDesignTimeHtml
public override string GetDesignTimeHtml()
{
System.IO.StringWriter sw = new System.IO.StringWriter();
HtmlTextWriter tw = new HtmlTextWriter(sw);
JSCalendar oCal = Component as JSCalendar;
TextBox oBox = new TextBox();
oBox.Text = oCal.DateTimeValue.ToString(oCal.OutputFormat);
oBox.CssClass = oCal.CssClass;
oBox.RenderControl(tw);
return sw.ToString();
}