diff --git a/knowledge-base/common-navigate-from-button.md b/knowledge-base/common-navigate-from-button.md index 7a12e6ca61..65dfd84e46 100644 --- a/knowledge-base/common-navigate-from-button.md +++ b/knowledge-base/common-navigate-from-button.md @@ -35,15 +35,34 @@ You can style anchors to look like Telerik buttons through the `k-button` CSS cl >caption Open a new browser window from a button -![make links look like buttons](images/links-like-buttons.png) - ````CSHTML -Fetch Data -

-Counter -

-telerik.com in new window -

-Google in new window +@inject NavigationManager NavManager +@inject IJSRuntime JS + +Navigate to telerik.com in the same window + +
+ +Navigate to telerik.com in a new window using JSInterop + +
+ + + Google in new window + + +@code{ + private void OnButtonClick() + { + NavManager.NavigateTo("https://www.telerik.com"); + } + + private async Task OnButtonClickAsync() + { + await JS.InvokeVoidAsync("open", "https://www.telerik.com", "_blank"); + } +} ````