コード例 #1
0
ファイル: Webber.cs プロジェクト: bencz/csharp-telnet-client
        // ------------------------- RedirectTo -------------------------------
        // Called by pages when redirecting to this page.
        // aspx pages should implement their own version when the page contains
        // QueryString parameters.  Otherwise, this base class can sparamete
        public static void RedirectTo(
            AcPage InFromPage, PageProperties InToPage, RedirectParms InParms)
        {
            bool   bArgs      = false;
            string subDir     = InFromPage.CalcRedirectDirPath(InToPage.PageDirPath);
            string passSessId = InFromPage.ComposePassSessId();

            // Build the full path name needed to redirect to this page relative to the
            // current page ( the from page )
            System.Text.StringBuilder url = new System.Text.StringBuilder(256);
            if (subDir != null)
            {
                url.Append(subDir + "/");
            }
            url.Append(InToPage.PageFileName);

            // add the SessId needed when a "no cookies browser"
            if (passSessId != null)
            {
                url.Append("?" + passSessId);
                bArgs = true;
            }

            // add the querystring parms.
            if (InParms.IsNotEmpty)
            {
                if (bArgs == false)
                {
                    url.Append("?" + InParms.QueryString);
                }
                else
                {
                    url.Append("&" + InParms.QueryString);
                }
                bArgs = true;
            }

            // redirect to the page.
            InFromPage.Response.Redirect(url.ToString());
        }
コード例 #2
0
ファイル: AcPage.cs プロジェクト: bencz/csharp-telnet-client
 // ------------------------- RedirectTo -------------------------------
 // Called by pages when redirecting to this page.
 // aspx pages should implement their own version when the page contains
 // QueryString parameters.  Otherwise, this base class can do the job.
 public virtual void RedirectTo(AcPage InFromPage)
 {
     RedirectTo(InFromPage, new RedirectParms( ));
 }
コード例 #3
0
ファイル: Webber.cs プロジェクト: bencz/csharp-telnet-client
 // ------------------------- RedirectTo -------------------------------
 // Called by pages when redirecting to this page.
 // aspx pages should implement their own version when the page contains
 // QueryString parameters.  Otherwise, this base class can do the job.
 public static void RedirectTo(AcPage InFromPage, PageProperties InToPage)
 {
     RedirectTo(InFromPage, InToPage, new RedirectParms());
 }