Use Image, Icon, Badge or Heading as (Hyper) Link

Hi,

there is a component called "Link" that can display a text or an icon and act as hyperlink (either for external links or page links for navigation). However, is there any way how I can use an existing Image, Icon, Badge or also Heading component as link? So if the user clicks on the control, I want to invoke a navigation to a URL or another page. Most components only have MouseEnter/MouseLeave events but no "Click" or "Mouse Down".

In the HTML code this would be easy to handle by simply wrapping an A tag around the desired control. But this is not possible in the Radzen designer.

Any ideas how this could be done?

Best regards,

Joe

You can use attributes to assign @onclick. Here is an example with navigation to some other page in the app: @(args => UriHelper.NavigateTo("other-page"))

2 Likes

Thanks a lot! That works perfectly! :smile: