BannerControl¶
BannerControl is the legacy site-banner renderer for SAIF WebForms pages. It reads an external SITEBANNER.XML resource file at runtime and renders print/display banner markup that varies by internal-vs-external client context and by whether the current page is the online-login screen; it also owns the logout postback flow (session/cookie cleanup and redirect).
Purpose¶
- Render the site banner (print and interactive display variants) by parsing an XML resource resolved via
Server.MapPath, decoupling banner content/links from page markup. - Apply environment-conditional defaults for banner/feedback/logout visibility based on
AppGlobal.EnvironmentService.IsClientExternal(BR-V2-001). - Suppress logout/interactive-feedback UI when the current virtual directory is the login application (BR-V2-002).
- Handle the logout postback: abandon the session, clear authentication cookies, and redirect to the login screen.
Context¶
- Namespace:
SAIF.Presentation.Web.Controls.V2 - Assembly/package: Compiled into
SAIF.BOF.Presentation.Web.Infragistics103(this project's.vbsources are bundled into theSAIF.Presentation.Web.Core.Infragistics103project's output assembly)*
Public members¶
| Member | Signature | Purpose |
|---|---|---|
New() |
Public Sub New() |
Constructs the control and wires the logout/feedback link controls into the control tree. |
MenuNavigate |
Public Event MenuNavigate(ByVal Application As String, ByVal page As String) |
Raised after a successful logout so host pages can react to navigation away from the current application. |
ShowInternalDisplayBanner |
Public Property ShowInternalDisplayBanner As Boolean |
Controls whether the interactive display banner (beyond the always-rendered print banner) is shown for internal clients; defaults to True for external clients. |
Visible |
Public Overrides Property Visible As Boolean |
Overrides the base Visible property to persist its value in ViewState under a custom key. |
DisplayBannerLogout |
Public Property DisplayBannerLogout As Boolean |
Determines whether the logout link renders in the display banner; defaults per BR-V2-001. |
DisplayBannerFeedback |
Public Property DisplayBannerFeedback As Boolean |
Determines whether the feedback link renders in the display banner; defaults per BR-V2-001. |
PrintPageTitle |
Public Property PrintPageTitle As String |
Title text substituted into the print-variant banner markup. |
LoggingIn |
Public Property LoggingIn As Boolean |
Indicates the current page is the login screen, suppressing the logout link per BR-V2-002. |
Inherited public members¶
BannerControl inherits from WebControl (System.Web.UI.WebControls), a framework base class rather than a documented SAIF dependency library.
| Member | Signature | Purpose |
|---|---|---|
AccessKey |
Public Property AccessKey As String |
Keyboard shortcut character used to move focus to the rendered banner element. |
Attributes |
Public ReadOnly Property Attributes As AttributeCollection |
Collection of arbitrary HTML attributes rendered on the control's outer tag. |
BackColor |
Public Property BackColor As Color |
Background color applied to the rendered banner element. |
ForeColor |
Public Property ForeColor As Color |
Foreground (text) color applied to the rendered banner element. |
BorderColor |
Public Property BorderColor As Color |
Border color applied to the rendered banner element. |
BorderStyle |
Public Property BorderStyle As BorderStyle |
Border line style applied to the rendered banner element. |
BorderWidth |
Public Property BorderWidth As Unit |
Border width applied to the rendered banner element. |
CssClass |
Public Property CssClass As String |
CSS class name(s) rendered on the control's outer tag. |
Enabled |
Public Property Enabled As Boolean |
Controls whether the rendered banner control participates in enabled-state behavior. |
Font |
Public ReadOnly Property Font As FontInfo |
Font styling applied to the rendered outer element. |
Height |
Public Property Height As Unit |
Height of the rendered banner element. |
Width |
Public Property Width As Unit |
Width of the rendered banner element. |
Style |
Public ReadOnly Property Style As CssStyleCollection |
Inline CSS style declarations rendered on the outer tag. |
TabIndex |
Public Property TabIndex As Short |
Tab order of the rendered element among focusable page elements. |
ToolTip |
Public Property ToolTip As String |
Text shown as a native tooltip when hovering the rendered element. |
Standard WebControl/Control members (ID, ClientID, Controls, Visible, DataBind, FindControl, etc.) are not re-documented here as they are unmodified framework behavior**.
Behavioral notes¶
OnInitcallsSetBannerControlDefaults()unless in design mode, resolving the banner XML resource path and computingLoggingInfrom the current virtual directory name.Renderwrites a static placeholder in design mode, or silently renders nothing if the resolved resource path is empty*.- The logout click handler (
FeedbackHelpLogout_Click) abandons the session, clears theASP.NET_SessionIdandSAIFAUTHcookies, and redirects to/OnlineLogin/loginscreen.aspx. - See Banner rendering and logout for the full step-by-step operation.
Constraints and usage notes¶
- Depends on
SAIF.Framework'sAppGlobal.EnvironmentService(viaImports SAIF.Framework.Security) to determine internal-vs-external client context; the exact type providingAppGlobalcould not be confirmed from this project's imports alone*. - The banner XML resource (
SITEBANNER.XML) must exist at the resolved/RESOURCES/path at runtime, or no display banner is rendered.
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.
Sources¶
- SAIF.Presentation.Web.Controls.V2\Banner.vb