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


C# XhtmlMobileTextWriter.WriteEncodedUrl方法代码示例

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


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

示例1: RenderPostbackUrl

 private void RenderPostbackUrl(XhtmlMobileTextWriter writer) {
     if ((String)Device["requiresAbsolutePostbackUrl"] == "true") {
         RenderAbsolutePostbackUrl (writer);
         return;
     }
     if (Control.Action.Length > 0) {
         String url = Control.ResolveUrl(PreprocessQueryString(Control.Action));
         writer.Write(url);
     }
     else {
         writer.WriteEncodedUrl(Page.RelativeFilePath);
     }
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:13,代码来源:XhtmlBasicFormAdapter.cs

示例2: RenderAbsolutePostbackUrl

 private void RenderAbsolutePostbackUrl(XhtmlMobileTextWriter writer) {
     String url = PreprocessQueryString(Control.Action);
     if (url.Length > 0) {
         // Not only do we need to resolve the URL, but we need to make it absolute.
         url = Page.MakePathAbsolute(Control.ResolveUrl(url));
         writer.Write(url);
     }
     else {
         writer.WriteEncodedUrl(Page.AbsoluteFilePath);
     }
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:11,代码来源:XhtmlBasicFormAdapter.cs

示例3: RenderUrlPostBackEvent

        /// <include file='doc\XhtmlBasicPageAdapter.uex' path='docs/doc[@for="XhtmlPageAdapter.RenderUrlPostBackEvent"]/*' />
        public virtual void RenderUrlPostBackEvent (XhtmlMobileTextWriter writer,
            String target, 
            String argument) {

            String amp = (String)Device[XhtmlConstants.SupportsUrlAttributeEncoding] == "false"  ? "&" : "&amp;";
            
            if ((String)Device["requiresAbsolutePostbackUrl"] == "true") {
                writer.WriteEncodedUrl(Page.AbsoluteFilePath);
            }
            else {
                writer.WriteEncodedUrl(Page.RelativeFilePath);
            }
            writer.Write ("?");

            // Encode ViewStateID=.....&__ET=controlid&__EA=value in URL
            // Note: the encoding needs to be agreed with the page
            // adapter which handles the post back info
            String pageState = Page.ClientViewState;
            if (pageState != null) {
                writer.WriteUrlParameter (MobilePage.ViewStateID, pageState);
                writer.Write (amp);
            }
            writer.WriteUrlParameter (EventSourceKey, target);
            writer.Write (amp);
            writer.WriteUrlParameter (EventArgumentKey, argument);
            RenderHiddenVariablesInUrl (writer);

            // Unique file path suffix is used for identify if query
            // string text is present.  Corresponding code needs to agree
            // on this.  Even if the query string is empty, we still need
            // to output the suffix to indicate this. (this corresponds
            // to the code that handles the postback)
            writer.Write(amp);
            writer.Write(Constants.UniqueFilePathSuffixVariable);

            String queryStringText = PreprocessQueryString(Page.QueryStringText);

            if (queryStringText != null && queryStringText.Length > 0) {
                writer.Write (amp);
                if ((String)Device[XhtmlConstants.SupportsUrlAttributeEncoding] != "false") {
                    writer.WriteEncodedAttributeValue(queryStringText);
                }
                else {
                    writer.Write (queryStringText);
                }
            }
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:48,代码来源:XhtmlBasicPageAdapter.cs


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