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¶
OnInitcallsSetBannerControlDefaults()(skipped in design mode) — determinesm_InsiderfromIsClientExternal, sets default visibility of feedback/logout/banner sections (BR-V2-001), resolvesm_resourcesPathto the banner XML file viaHttpContext.Current.Server.MapPath, and setsLoggingInto true if the current app folder is"ONLINELOGIN"(BR-V2-002).Renderbranches:- If
Context Is Nothing(design-time): writes a static placeholder banner<div>. - If the resource path is empty: exits without rendering (no banner shown) — pure fallback behavior, not an error.
- Loads
m_BannerXMLfrom the resolved file and extracts theprintnode — always rendered viaRenderPrintBannerregardless of internal/external context. - If
ShowInternalDisplayBanneris false, exits before rendering the interactive display banner. - Otherwise extracts the
displaynode, splits its markup around a[LINKS]placeholder, and renders (inBannerControlV2) the SAIF.com link, logout link (ifDisplayBannerLogout And Not LoggingIn), feedback link/anchor (varies byLoggingIn), and remaining split text. - On logout link click (
FeedbackHelpLogout_Click, handledHandles m_LogoutLink.Click): - Abandons the session (
Session.Abandon()). - Sets response cache/expiry headers.
- Clears
ASP.NET_SessionIdandSAIFAUTHcookies. - Redirects to
/OnlineLogin/loginscreen.aspx. - Raises the public
MenuNavigateevent 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*.
Related documentation¶
Sources¶
- SAIF.Presentation.Web.Controls.V2\Banner.vb
- SAIF.Presentation.Web.Controls.V2\BannerControlV2.vb