Beispiel #1
0
 /// <summary>
 /// 通过页面输出状态,加载控件的输出状态
 /// </summary>
 /// <param name="pageRenderMode">页面输出模式</param>
 /// <remarks>通过页面输出状态,加载控件的输出状态</remarks>
 public void LoadFromPageRenderMode(PageRenderMode pageRenderMode)
 {
     //if (!string.IsNullOrEmpty(controlUniqueID) && controlUniqueID == pageRenderMode.RenderControlUniqueID)
     //{
     //    this._OnlyRenderSelf = true;
     //}
     this._UseNewPage         = pageRenderMode.UseNewPage;
     this._ContentTypeKey     = pageRenderMode.ContentTypeKey;
     this._DispositionType    = pageRenderMode.DispositionType;
     this._AttachmentFileName = pageRenderMode.AttachmentFileName;
     this._PageCache          = pageRenderMode.PageCache;
     this._RenderArgument     = pageRenderMode.RenderArgument;
 }
Beispiel #2
0
        /// <summary>
        /// 获取当前请求的PageRenderMode
        /// </summary>
        /// <param name="context">HttpContext</param>
        /// <returns>PageRenderMode</returns>
        /// <remarks>获取当前请求的PageRenderMode</remarks>
        public static PageRenderMode GetRequestPageRenderMode()
        {
            string         cacheKey = PageExtension.PageRenderModeQueryStringName;
            PageRenderMode mode     = (PageRenderMode)HttpContext.Current.Items[cacheKey];

            if (mode == null)
            {
                string str = Request.GetRequestParamString(PageExtension.PageRenderModeQueryStringName, string.Empty);
                mode = str == string.Empty ? new PageRenderMode() : new PageRenderMode(str);
                HttpContext.Current.Items[cacheKey] = mode;
            }

            return(mode);
        }
Beispiel #3
0
 /// <summary>
 /// 通过页面输出模式,构造出UniqueID为controlUniqueID的控件输出模式
 /// </summary>
 /// <param name="pageRenderMode">页面输出模式</param>
 /// <remarks>通过页面输出模式,构造出UniqueID为controlUniqueID的控件输出模式</remarks>
 public ControlRenderMode(PageRenderMode pageRenderMode)
     : this()
 {
     LoadFromPageRenderMode(pageRenderMode);
 }
Beispiel #4
0
 /// <summary>
 /// 将PageRenderMode添加到当前请求ExecutionUrl,并返回Url
 /// </summary>
 /// <param name="pageRenderMode">PageRenderMode</param>
 /// <param name="ignoreParamNames">忽略原始的QueryString中参数名称</param>
 /// <returns>结果Url</returns>
 /// <remarks>将PageRenderMode添加到当前请求ExecutionUrl,并返回Url</remarks>
 public static string GetRequestExecutionUrl(PageRenderMode pageRenderMode, params string[] ignoreParamNames)
 {
     return(GetRequestExecutionUrl(PageExtension.PageRenderModeQueryStringName, pageRenderMode.ToString(), ignoreParamNames));
 }