本文整理汇总了C#中System.Web.UI.HtmlTextWriter.AddPrevalueRow方法的典型用法代码示例。如果您正苦于以下问题:C# HtmlTextWriter.AddPrevalueRow方法的具体用法?C# HtmlTextWriter.AddPrevalueRow怎么用?C# HtmlTextWriter.AddPrevalueRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.UI.HtmlTextWriter
的用法示例。
在下文中一共展示了HtmlTextWriter.AddPrevalueRow方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RenderContents
/// <summary>
/// Renders the contents of the control to the specified writer. This method is used primarily by control developers.
/// </summary>
/// <param name="writer">A <see cref="T:System.Web.UI.HtmlTextWriter"/> that represents the output stream to render HTML content on the client.</param>
protected override void RenderContents(HtmlTextWriter writer)
{
// add property fields
writer.AddPrevalueRow("'On' label", "The label text for the true (on) state", this.OnText);
writer.AddPrevalueRow("'On' background", "The background-color for the true (on) state", this.OnBackgroundColor);
writer.AddPrevalueRow("'Off' label", "The label text for the false (off) state", this.OffText);
writer.AddPrevalueRow("'Off' background", "The background-color for the false (off) state", this.OffBackgroundColor);
writer.AddPrevalueRow("Default state", "The initial position for the ToggleBox on the edit page, either 'on' or 'off'", this.DefaultValue);
}
示例2: RenderContents
/// <summary>
/// Renders the contents of the control to the specified writer. This method is used primarily by control developers.
/// </summary>
/// <param name="writer">A <see cref="T:System.Web.UI.HtmlTextWriter"/> that represents the output stream to render HTML content on the client.</param>
protected override void RenderContents(HtmlTextWriter writer)
{
// add property fields
writer.AddPrevalueRow("Database Type:", this.DatabaseDataType);
writer.AddPrevalueRow("Enable Range:", this.EnableRange);
writer.AddPrevalueRow("Range:", this.RangeValue);
writer.AddPrevalueRow("Initial Value:", this.Value);
writer.AddPrevalueRow("Initial Value 2:", this.Value2);
writer.AddPrevalueRow("Minimum Value:", this.MinValue);
writer.AddPrevalueRow("Maximum Value:", this.MaxValue);
writer.AddPrevalueRow("Enable Step Increments:", this.EnableStep);
writer.AddPrevalueRow("Step Increments:", this.StepValue);
writer.AddPrevalueRow("Orientation:", this.Orientation);
////writer.AddPrevalueRow(" ", new LiteralControl("<h2 class='propertypaneTitel'>Preview:</h2><br/>"), this.PreviewSlider);
// add jquery window load event for toggling fields.
var javascriptMethod = string.Format(
@"
$('#{0}').click(function(){{
var disable = !$(this).attr('checked');
$('#{1},#{3}').attr('disabled', disable);
$('#{6}').val(disable && !checkDecimals() ? 'Integer' : 'Nvarchar');
if(!disable) disable = $('#{1}').val() != '';
}});
$('#{1}').change(function(){{
var disable = $(this).val() != '';
$('#{3}').attr('disabled', disable);
}});
$('#{4}').click(function(){{
var disable = !$(this).attr('checked');
$('#{5}').attr('disabled', disable);
}});
$('#{6}').change(function(){{
var disable = $(this).val() == 'Integer';
if (checkDecimals() && disable) {{
$('#{6}').val('Nvarchar');
alert('Please remove decimal points below if you wish to use the Integer datatype');
}}
else {{
$('#{0}').removeAttr('checked');
$('#{1},#{3}').attr('disabled', disable);
}}
}});
$('.slider-numeric').keydown(function(event) {{
// Allow only backspace and delete
if ( event.keyCode == 46 || event.keyCode == 8 || ($(this).hasClass('slider-decimal') && (event.keyCode == 110 || event.keyCode == 190))) {{
// let it happen, don't do anything
}} else {{
// Ensure that it is a number and stop the keypress
if ( (event.keyCode < 48 || event.keyCode > 57 ) && (event.keyCode < 96 || event.keyCode > 105 ) ) {{
event.preventDefault();
}}
}}
}});
$('.slider-numeric').keyup(function(event) {{
if ($('#{6}').val() != 'Nvarchar' && checkDecimals()) {{
$('#{6}').val('Nvarchar');
}}
}});
function checkDecimals() {{
foundDecimals = false;
$('.slider-numeric').each(function() {{
if ($(this).val().indexOf('.') >= 0) {{
foundDecimals = true;
return false;
}}
}});
return foundDecimals;
}}
",
this.EnableRange.ClientID,
this.RangeValue.ClientID,
this.Value.ClientID,
this.Value2.ClientID,
this.EnableStep.ClientID,
this.StepValue.ClientID,
this.DatabaseDataType.ClientID);
var javascript = string.Concat("<script type='text/javascript'>jQuery(window).load(function(){", javascriptMethod, "});</script>");
writer.WriteLine(javascript);
}
示例3: RenderContents
/// <summary>
/// Renders the contents of the control to the specified writer. This method is used primarily by control developers.
/// </summary>
/// <param name="writer">A <see cref="T:System.Web.UI.HtmlTextWriter"/> that represents the output stream to render HTML content on the client.</param>
protected override void RenderContents(HtmlTextWriter writer)
{
// add property fields
writer.AddPrevalueRow("Minimum:", "Minimum number of rows to display.", this.TextBoxMinimum);
writer.AddPrevalueRow("Maximum:", "Maximum number of rows to display.", this.TextBoxMaximum);
}
示例4: Render
/// <summary>
/// Sends server control content to a provided <see cref="T:System.Web.UI.HtmlTextWriter"/> object, which writes the content to be rendered on the client.
/// </summary>
/// <param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter"/> object that receives the server control content.</param>
protected override void Render(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Class, Constants.ApplicationName);
writer.RenderBeginTag(HtmlTextWriterTag.Div); //// start 'uComponents'
// add property fields
writer.AddPrevalueRow("Properties to search on :", "Please select properties to search on ", this._propertiesToSearchOn);
writer.AddPrevalueRow("Maximum number of results to return :", "", this._txtMaxResults);
writer.AddPrevalueRow("Index to search on", "Please select umbraco index to search, please note this will not work with media index", this._indexToSearch);
writer.RenderEndTag(); //// end 'uComponents'
}
示例5: RenderContents
/// <summary>
/// Renders the contents of the control to the specified writer. This method is used primarily by control developers.
/// </summary>
/// <param name="writer">A <see cref="T:System.Web.UI.HtmlTextWriter"/> that represents the output stream to render HTML content on the client.</param>
protected override void RenderContents(HtmlTextWriter writer)
{
// add property fields
writer.AddPrevalueRow("Show label?", this.ShowLabel);
writer.AddPrevalueRow("Macro Editor", this.MacroEditor);
writer.AddPrevalueRow(string.Empty, "Please note: If a document is unpublished or is used on a non-content section (e.g. media, member or custom), then the root content node (usually your homepage) will be used as the context.", this.Styles);
}
示例6: RenderContents
/// <summary>
/// Renders the contents of the control to the specified writer. This method is used primarily by control developers.
/// </summary>
/// <param name="writer">A <see cref="T:System.Web.UI.HtmlTextWriter"/> that represents the output stream to render HTML content on the client.</param>
protected override void RenderContents(HtmlTextWriter writer)
{
// add property fields
writer.AddPrevalueRow("ListControl Type:", this.ListControlType);
writer.AddPrevalueRow("User Type:", this.UserTypesList);
}
示例7: RenderContents
/// <summary>
/// Replaces the base class writer and instead uses the shared uComponents extension method, to inject consistant markup
/// </summary>
/// <param name="writer"></param>
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddPrevalueRow("Type", @"xml schema to query", this.typeRadioButtonList);
writer.AddPrevalueRow("XPath Expression", @"expects a result set of node, meda or member elements", this.xPathTextBox, this.xPathRequiredFieldValidator, this.xPathCustomValidator);
writer.AddPrevalueRow("Sort On", "property to sort the source data on - empty = xml order", this.sortOnDropDown);
if (this.sortDirectionRadioButtonList.Visible)
{
writer.AddPrevalueRow("Sort Direction", "", this.sortDirectionRadioButtonList);
}
else
{
// render the control so it's state is persisted, but without any additional layout markup
this.sortDirectionRadioButtonList.RenderControl(writer);
}
writer.AddPrevalueRow("Limit To", "limit the source data count - 0 means no limit", this.limitToTextBox, this.limitToRegularExpressionValidator);
writer.AddPrevalueRow("List Height", "px height of the source list - 0 means not set / no scrolling", this.listHeightTextBox, this.listHeightRegularExpressionValidator);
writer.AddPrevalueRow("Macro", "macro expects an int paramter named 'id'", this.macroDropDownList);
writer.AddPrevalueRow("Css File", "can use classes: .xpath-templatable-list.datatype-id-" + this.DataType.DataTypeDefinitionId + ".property-alias-????", this.cssFileDropDownList);
writer.AddPrevalueRow("Script File", "contents passed as callback parameter to datatype initialization (can use classes above)", this.scriptFileDropDownList);
writer.AddPrevalueRow("Min Items", "number of items that must be selected", this.minItemsTextBox, this.minItemsRegularExpressionValidator, this.minItemsCustomValidator);
writer.AddPrevalueRow("Max Items", "number of items that can be selected - 0 means no limit", this.maxItemsTextBox, this.maxItemsCustomValidator); // BUG: this.maxItemsRegularExpressionValidator doens't work here !
writer.AddPrevalueRow("Allow Duplicates", "when checked, duplicate values can be selected", this.allowDuplicatesCheckBox);
}
示例8: Render
/// <summary>
/// Sends server control content to a provided <see cref="T:System.Web.UI.HtmlTextWriter"/> object, which writes the content to be rendered on the client.
/// </summary>
/// <param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter"/> object that receives the server control content.</param>
protected override void Render(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Class, Constants.ApplicationName);
writer.RenderBeginTag(HtmlTextWriterTag.Div);
// add property fields
writer.AddPrevalueRow("Allowed modes:", "Select all modes which are allowed for this data type", this.ModeSelector);
writer.AddPrevalueRow("Default mode:", "Choose a mode which is shown for empty instances of this data type", this.DefaultModeDropDown);
writer.AddPrevalueRow(
"Data format:",
@"You can specify to store the data in a number of formats:
<ul>
<li>XML is best for retrieval by XSLT,</li>
<li>CSV is best for retrieval by scripting languages like Python,</li>
<li>JSON is best for retrieval by Javascript (you never know!)</li>
</ul>
To get at the data easily in .NET, you can use the method
<strong>uComponents.DataTypes.UrlPicker.Dto.UrlPickerState.Deserialize</strong> and pass it the data in any format",
this.DataFormatDropDown);
writer.AddPrevalueRow("Allow link title:", "User can specify a title for the link", this.EnableTitleCheckbox);
writer.AddPrevalueRow("Allow new window:", "User can specify link to open in new window", this.EnableNewWindowCheckbox);
writer.RenderEndTag();
}
示例9: RenderContents
/// <summary>
/// Renders the contents of the control to the specified writer. This method is used primarily by control developers.
/// </summary>
/// <param name="writer">A <see cref="T:System.Web.UI.HtmlTextWriter"/> that represents the output stream to render HTML content on the client.</param>
protected override void RenderContents(HtmlTextWriter writer)
{
// add property fields
writer.AddPrevalueHeading("Amazon S3 and Cloud Front API Settings");
writer.AddPrevalueRow("", "Add your Amazon account information here.");
writer.AddPrevalueRow("Access Key:", this.txtAccessKey);
writer.AddPrevalueRow("Secret Key:", this.txtSecretKey);
}
示例10: RenderContents
/// <summary>
/// Renders the contents of the control to the specified writer. This method is used primarily by control developers.
/// </summary>
/// <param name="writer">A <see cref="T:System.Web.UI.HtmlTextWriter"/> that represents the output stream to render HTML content on the client.</param>
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddPrevalueRow("XML File Path:", "Specify the path to the XML file.", this.PathPickerXmlFilePath);
writer.AddPrevalueRow("XPath Expression:", "The XPath expression to select the nodes used in the XML file.", this.TextBoxXPathExpression);
writer.AddPrevalueRow("Text column:", "The name of the field used for the item's display text.", this.TextBoxTextColumn);
writer.AddPrevalueRow("Value column:", "The name of the field used for the item's value.", this.TextBoxValueColumn);
}
示例11: RenderContents
/// <summary>
/// Replaces the base class writer and instead uses the shared uComponents extension method, to inject consistant markup
/// </summary>
/// <param name="writer">A <see cref="T:System.Web.UI.HtmlTextWriter"/> that represents the output stream to render HTML content on the client.</param>
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddPrevalueRow("Image Property Alias", "(recursive) property to use as source for image", this.imagePropertyAliasPicker);
writer.AddPrevalueRow("Width", "width in px (0 = calculate from image)", this.widthTextBox);
writer.AddPrevalueRow("Height", "height in px (0 = calculate from image)", this.heightTextBox);
}
示例12: RenderContents
/// <summary>
/// Renders the contents of the control to the specified writer. This method is used primarily by control developers.
/// </summary>
/// <param name="writer">A <see cref="T:System.Web.UI.HtmlTextWriter"/> that represents the output stream to render HTML content on the client.</param>
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddPrevalueRow("XPath Start Node", "first matched node will be the root of the tree", this.treeStartNodeXPathTextBox, this.treeStartNodeXPathRequiredFieldValidator, this.treeStartNodeXPathCustomValidator);
writer.AddPrevalueRow("XPath Filter", "not required - only matched nodes will have checkboxes", this.selectableTreeNodesXPathTextBox, this.selectableTreeNodesXPathCustomValidator);
writer.AddPrevalueRow("Min Selection", "0 = no limit", this.minSelectionTextBox);
writer.AddPrevalueRow("Max Selection", "0 = no limit", this.maxSelectionTextBox);
writer.AddPrevalueRow("Auto Selection", "ensure a top down or bottom up tree selection", this.autoSelectionDropDownList);
writer.AddPrevalueRow("Show Tree Icons", "(doesn't yet work with sprites)", this.showTreeIconsCheckBox);
writer.AddPrevalueRow("Expand Options", "on load, select whether to collapse all, expand all or only selected branches.", this.selectExpandOptionDropDownList);
writer.AddPrevalueRow("Output Format", this.selectOutputFormat);
}
示例13: Render
/// <summary>
/// Sends server control content to a provided <see cref="T:System.Web.UI.HtmlTextWriter"/> object, which writes the content to be rendered on the client.
/// </summary>
/// <param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter"/> object that receives the server control content.</param>
protected override void Render(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Class, Constants.ApplicationName);
writer.RenderBeginTag(HtmlTextWriterTag.Div); //// start 'uComponents'
// add property fields
writer.AddPrevalueRow("Textbox width:", this.WidthTextBox);
writer.AddPrevalueRow("Textbox style:", this.StyleTextBox);
writer.AddPrevalueRow("Preview:", "Hit the 'Save' button to view preview", this.PreviewTextBox);
writer.RenderEndTag(); //// end 'uComponents'
}
示例14: RenderContents
/// <summary>
/// Renders the contents of the control to the specified writer. This method is used primarily by control developers.
/// </summary>
/// <param name="writer">A <see cref="T:System.Web.UI.HtmlTextWriter"/> that represents the output stream to render HTML content on the client.</param>
protected override void RenderContents(HtmlTextWriter writer)
{
writer.AddPrevalueRow("Object Type", this.objectTypesDropDownList);
writer.AddPrevalueRow("Content Type", this.contentTypesDropDownList);
writer.AddPrevalueRow("Include default attributes?", "This option includes all the default attribute properties for the given content type; e.g. @id, @nodeName, etc.", this.includeDefaultAttributesCheckBox);
}
示例15: RenderContents
/// <summary>
/// Renders the contents of the control to the specified writer. This method is used primarily by control developers.
/// </summary>
/// <param name="writer">A <see cref="T:System.Web.UI.HtmlTextWriter"/> that represents the output stream to render HTML content on the client.</param>
protected override void RenderContents(HtmlTextWriter writer)
{
// add property fields
writer.AddPrevalueHeading("Azure CDN API Settings");
writer.AddPrevalueRow("", "Add your Azure account information here.");
writer.AddPrevalueRow("Account Name:", this.txtAccountName);
writer.AddPrevalueRow("Key:", this.txtKey);
}