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


C# XhtmlMobileTextWriter.WriteHiddenField方法代码示例

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


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

示例1: RenderPageState

 private void RenderPageState (XhtmlMobileTextWriter writer) {
     String viewState = Page.ClientViewState;
     if (viewState != null) {
         writer.WriteHiddenField (MobilePage.ViewStateID, viewState);
     }
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:6,代码来源:XhtmlBasicFormAdapter.cs

示例2: RenderHiddenVariables

 private void RenderHiddenVariables(XhtmlMobileTextWriter writer) {
     if (Page.HasHiddenVariables()) {
         String hiddenVariablePrefix = MobilePage.HiddenVariablePrefix;
         foreach (DictionaryEntry entry in Page.HiddenVariables) {
             if (entry.Value != null) {
                 writer.WriteHiddenField(hiddenVariablePrefix + (String)entry.Key, 
                     (String)entry.Value);
             }
         }
     }
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:11,代码来源:XhtmlBasicFormAdapter.cs

示例3: RenderAsHiddenInputField

        /// <include file='doc\XhtmlBasicTextBoxAdapter.uex' path='docs/doc[@for="XhtmlTextBoxAdapter.RenderAsHiddenInputField"]/*' />
        protected override void RenderAsHiddenInputField(XhtmlMobileTextWriter writer) {
            // Optimization - if viewstate is enabled for this control, and the
            // postback returns to this page, we just let it do the trick.

            if (Control.Form.Action.Length > 0 || (!IsViewStateEnabled() && Control.Text != _staticValue)) {
                writer.WriteHiddenField(Control.UniqueID, Control.Text);
            }
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:9,代码来源:XhtmlBasicTextBoxAdapter.cs

示例4: RenderPostBackHeader

        private void RenderPostBackHeader(XhtmlMobileTextWriter writer) {
            bool postBack = Page.ActiveForm.Action.Length == 0;

            RenderPageState(writer);
            if (!postBack) {
                writer.WriteHiddenField(PageAdapter.EventSourceKey, XhtmlConstants.PostedFromOtherFile);
            }
            else if (Page.ClientViewState == null) {
                // The empty event source variable is used to identify a
                // postback request.  Value attribute is not needed, and some
                // devices do not allow empty string value attributes.
                if ((String)Device["requiresHiddenFieldValues"] != "true") {
                    writer.WriteHiddenField(PageAdapter.EventSourceKey);
                }
                else {
                    // Placeholder value is never used, just needed for some devices.
                    writer.WriteHiddenField(PageAdapter.EventSourceKey, PageAdapter.EventSourceKey);
                }
            }

            RenderHiddenVariables(writer);
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:22,代码来源:XhtmlBasicFormAdapter.cs

示例5: RenderAsHiddenInputField

        /// <include file='doc\XhtmlBasicSelectionListAdapter.uex' path='docs/doc[@for="XhtmlSelectionListAdapter.RenderAsHiddenInputField"]/*' />
        protected override void RenderAsHiddenInputField(XhtmlMobileTextWriter writer) {
            // Optimization - if viewstate is enabled for this control, and the
            // postback returns to this page, we just let it do the trick.
            // One catch though - if the control is multiselect, it always 
            // interprets return values, so we do need to write out.

            if (Control.IsMultiSelect || Control.Form.Action.Length > 0 || !IsViewStateEnabled()) {
                String uniqueID = Control.UniqueID;
                MobileListItemCollection items = Control.Items;
                for (int i = 0; i < items.Count; i++) {
                    if (items[i].Selected) {
                        writer.WriteHiddenField(uniqueID, i.ToString(CultureInfo.InvariantCulture));
                    }
                }
            }
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:17,代码来源:XhtmlBasicSelectionListAdapter.cs


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