Skip to content

Banner rendering and logout

This operation renders the SAIF site banner (via BannerControl or its revised successor BannerControlV2) and handles the interactive logout flow raised from the banner's logout link.

Field Value
Operation ID OP-V2-BANNER-001
Trigger Page containing the control executes the ASP.NET render pipeline (OnInit → Render); logout is triggered by a postback from the rendered "Logout" LinkButton.
Inputs AppGlobal.EnvironmentService.IsClientExternal, current virtual directory name, SITEBANNER.XML/SITEBANNERV2.XML file content, PrintPageTitle/DisplayBannerLogout/DisplayBannerFeedback properties.
Outputs HTML banner markup (print and/or display variants) written to the HtmlTextWriter; on logout, an HTTP redirect.
Primary components BannerControl.OnInit/Render/FeedbackHelpLogout_Click, BannerControlV2 (equivalent members).
Entry point SAIF.Presentation.Web.Controls.V2\Banner.vb, SAIF.Presentation.Web.Controls.V2\BannerControlV2.vb

Steps

  1. OnInit calls SetBannerControlDefaults() (skipped in design mode) — determines m_Insider from IsClientExternal, sets default visibility of feedback/logout/banner sections (BR-V2-001), resolves m_resourcesPath to the banner XML file via HttpContext.Current.Server.MapPath, and sets LoggingIn to true if the current app folder is "ONLINELOGIN" (BR-V2-002).
  2. Render branches:
  3. If Context Is Nothing (design-time): writes a static placeholder banner <div>.
  4. If the resource path is empty: exits without rendering (no banner shown) — pure fallback behavior, not an error.
  5. Loads m_BannerXML from the resolved file and extracts the print node — always rendered via RenderPrintBanner regardless of internal/external context.
  6. If ShowInternalDisplayBanner is false, exits before rendering the interactive display banner.
  7. Otherwise extracts the display node, splits its markup around a [LINKS] placeholder, and renders (in BannerControlV2) the SAIF.com link, logout link (if DisplayBannerLogout And Not LoggingIn), feedback link/anchor (varies by LoggingIn), and remaining split text.
  8. On logout link click (FeedbackHelpLogout_Click, handled Handles m_LogoutLink.Click):
  9. Abandons the session (Session.Abandon()).
  10. Sets response cache/expiry headers.
  11. Clears ASP.NET_SessionId and SAIFAUTH cookies.
  12. Redirects to /OnlineLogin/loginscreen.aspx.
  13. Raises the public MenuNavigate event for any host page listeners.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Render pipeline OnInit]) --> S1[SetBannerControlDefaults]
    S1 --> S2{Design mode?}
    S2 -->|Yes| PH[Write static placeholder banner]
    S2 -->|No| S3{Resource path empty?}
    S3 -->|Yes| NoRender([No banner rendered])
    S3 -->|No| S4[Load banner XML, render print node]
    S4 --> S5{ShowInternalDisplayBanner?}
    S5 -->|No| Done1([Print banner only])
    S5 -->|Yes| S6[Render display banner with links]
    S6 --> Postback{Logout link clicked?}
    Postback -->|Yes| Logout[Session.Abandon, clear cookies, raise MenuNavigate]
    Logout --> Redirect([Redirect to /OnlineLogin/loginscreen.aspx])
    Postback -->|No| Done2([Rendered banner HTML])

Failure and edge-case behavior

  • Design-time rendering (Context Is Nothing) short-circuits to a static placeholder, bypassing the XML resource read entirely.
  • An empty resolved resource path silently suppresses all banner rendering — no exception is raised.
  • No delegation into other libraries occurs beyond reading the framework-provided AppGlobal.EnvironmentService*.

Sources

  • SAIF.Presentation.Web.Controls.V2\Banner.vb
  • SAIF.Presentation.Web.Controls.V2\BannerControlV2.vb