本文整理汇总了C#中XhtmlMobileTextWriter.AddOnEnterForwardSetVar方法的典型用法代码示例。如果您正苦于以下问题:C# XhtmlMobileTextWriter.AddOnEnterForwardSetVar方法的具体用法?C# XhtmlMobileTextWriter.AddOnEnterForwardSetVar怎么用?C# XhtmlMobileTextWriter.AddOnEnterForwardSetVar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XhtmlMobileTextWriter
的用法示例。
在下文中一共展示了XhtmlMobileTextWriter.AddOnEnterForwardSetVar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddOnEnterForward
private void AddOnEnterForward(XhtmlMobileTextWriter writer) {
if (Control.SelectType == ListSelectType.CheckBox) {
// ASURT 142732
writer.AddOnEnterForwardSetVar(Control.UniqueID);
return;
}
bool firstIndex = true;
StringBuilder builder = new StringBuilder();
for (int i = 0; i < Control.Items.Count; i++) {
if (Control.Items[i].Selected) {
if (!firstIndex) {
builder.Append(";");
}
builder.Append(i.ToString(CultureInfo.InvariantCulture));
firstIndex = false;
}
}
writer.AddOnEnterForwardSetVar(Control.UniqueID, builder.ToString());
}
示例2: Render
/// <include file='doc\XhtmlBasicTextBoxAdapter.uex' path='docs/doc[@for="XhtmlTextBoxAdapter.Render"]/*' />
public override void Render(XhtmlMobileTextWriter writer) {
ConditionalClearPendingBreak(writer);
ConditionalEnterStyle(writer, Style);
ConditionalRenderOpeningSpanElement(writer);
if ((String) Device[XhtmlConstants.RequiresOnEnterForward] == "true") {
writer.AddOnEnterForwardSetVar(Control.UniqueID, Control.Text);
}
writer.WriteBeginTag("input");
writer.WriteAttribute("name", Control.UniqueID);
ConditionalRenderCustomAttribute(writer, XhtmlConstants.AccessKeyCustomAttribute);
String controlText = Control.Text;
if (controlText != null && controlText.Length > 0 && !Control.Password) {
writer.Write(" value=\"");
writer.WriteEncodedText(controlText);
writer.Write("\"");
}
if (Control.Size > 0) {
writer.WriteAttribute("size", Control.Size.ToString(CultureInfo.InvariantCulture));
}
if (Control.MaxLength > 0) {
writer.WriteAttribute("maxlength", Control.MaxLength.ToString(CultureInfo.InvariantCulture));
}
String requiresType = Device["requiresInputTypeAttribute"];
if (Control.Password) {
writer.WriteAttribute("type", "password");
}
// InvariantCulture not needed, but included for best practices.
else if (requiresType != null && String.Equals(requiresType, "true", StringComparison.OrdinalIgnoreCase)) {
writer.WriteAttribute("type", "text");
}
writer.Write("/>");
// ConditionalSetPendingBreak should always be called *before* ConditionalExitStyle.
// ConditionalExitStyle may render a block element and clear the pending break.
ConditionalSetPendingBreakAfterInline(writer);
ConditionalRenderClosingSpanElement(writer);
ConditionalExitStyle(writer, Style);
}