It is possible to add complex content (i.e., server controls and HTML elements) in a RadLinkButton
instead of plain text. There are three ways to achieve this:
- Set the ContentTemplate property.
- In the markup of your page you can add controls to the ContentTemplate inner property as shown below:
- In the code-behind, you can set the ContentTemplate property to an instance of a class that implements the ITemplate interface.
- Add controls to the Controls collection of the RadLinkButton instance from the code-behind.
Important: As a best practice we would advise using simple, inline HTML in the ContentTemplate of the RadLinkButton control. This will ensure better usability, improved performance and flawless appearance.