---
title: Handle a menu link click
summary: Resolve a clicked favourite or application link back to an authorised menu item and raise navigation for the host page.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.V2.Menu
reference_type: package
operation_id: OP-MENU-009
trigger: "`SAIFMenu.LinkButtonClick`, the `Click` event of a favourite or application `LinkButton`."
---

# Handle a menu link click

Resolve a clicked favourite or application link back to an authorised menu item and raise navigation for the host page. This operation is implemented by `SAIFMenu.LinkButtonClick`, `SAIFMenu.NavigateToItem`.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-MENU-009 |
| **Trigger** | `SAIFMenu.LinkButtonClick`, the `Click` event of a favourite or application `LinkButton`. |
| **Inputs** | Clicked control's `ID`; `NavigationData.MenuAuthorizedItems`. |
| **Outputs** | `MenuNavigate(ApplicationPath, PageLink)` event, or a direct redirect for the change-password link. |
| **Primary components** | `SAIFMenu.LinkButtonClick`, `SAIFMenu.NavigateToItem` |
| **Entry point** | `SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenu.vb` |

## Steps

1. If the clicked link ID contains `ChangePWLink`, redirect to `/BusinessOnline/Changepassword.aspx?__SAIFPID=<ViewID>`. Enforces [BR-MENU-044](../business-rules.md#br-menu-044-the-change-password-link-redirects-with-the-view-id).
2. Otherwise parse the menu item sequence number from the substring following `_LB` in the link ID. Enforces [BR-MENU-045](../business-rules.md#br-menu-045-the-clicked-menu-item-is-identified-by-the-numeric-suffix-after-_lb).
3. Look the item up in `NavigationData.MenuAuthorizedItems`, persist the current context value to `Session("CVTextBox" & ViewID)`, and raise `MenuNavigate(ApplicationPath, PageLink)`. Enforces [BR-MENU-046](../business-rules.md#br-menu-046-navigation-targets-come-only-from-the-authorised-item), [BR-MENU-047](../business-rules.md#br-menu-047-the-control-never-navigates-itself-it-raises-menunavigate).
4. - On failure: any exception during sequence parsing or navigation is swallowed by an empty `Catch`. Enforces [BR-MENU-048](../business-rules.md#br-menu-048-a-malformed-link-id-or-failed-navigation-is-silently-ignored).

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start(["SAIFMenu.LinkButtonClick, the Click event of a favourite or application link"]) --> Check{Link ID contains ChangePWLink?}
	Check -->|Yes| Redirect(["Redirect to Changepassword.aspx"])
	Check -->|No| Parse["Parse menu item sequence number from _LB suffix"]
	Parse --> Lookup["Look up item in MenuAuthorizedItems"]
	Lookup --> Persist["Persist context value to Session(&quot;CVTextBox&quot; & ViewID)"]
	Persist --> Raise(["Raise MenuNavigate(ApplicationPath, PageLink)"])
	Parse -.->|Exception| Swallow(["Caught by empty Catch, ignored"])
```

## Failure and edge-case behavior

- Malformed link ID or lookup failure: silently ignored, no event raised, no error surfaced ([BR-MENU-048](../business-rules.md#br-menu-048-a-malformed-link-id-or-failed-navigation-is-silently-ignored)).

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Database tables](../database-tables.md)

## Sources
- `SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenu.vb`
