Esempio n. 1
0
        protected WebBasePage(HttpContext context, RequestDelegate next, PageSourceInfo info)
        {
            TkDebug.AssertArgumentNull(context, nameof(context), null);
            TkDebug.AssertArgumentNull(next, nameof(next), null);
            TkDebug.AssertArgumentNull(info, nameof(info), null);

            Context       = context;
            Session       = context.Session;
            Request       = context.Request;
            Response      = context.Response;
            Next          = next;
            QueryString   = new QueryStringWrapper(Request.Query);
            SessionGbl    = WebGlobalVariable.SessionGbl;
            IsPost        = HttpMethods.IsPost(Request.Method);
            fSupportLogOn = true;

            string localUrl = Request.GetDisplayUrl();

            fUrl    = new Uri(localUrl);
            SelfUrl = InternalUriUtil.GetSelfUrl(new Uri(localUrl));
            string retUrl = ObjectUtil.GetDefaultValue(Request.Query["RetUrl"].ToString(), string.Empty);

            RetUrl          = string.IsNullOrEmpty(retUrl) ? null : new Uri(retUrl, UriKind.RelativeOrAbsolute);
            fPageSourceInfo = info;
            //Style = fPageSourceInfo.Style;
        }
Esempio n. 2
0
        public static Uri GetSelfUrl(Uri baseUrl)
        {
            Uri selfUrl = InternalUriUtil.ProcessUri(baseUrl,
                                                     (name, value) => name.ToLower(ObjectUtil.SysCulture) != "returl", null);

            return(selfUrl);
        }