Include the Telerik registration on each page

Normally, you have to add

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

to each web page to get the Telerik controls to work. 

This technique will add the registration to the entire web site. 

 

 

You can avoid adding the 

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 directive at the top of every ASP.NET page by registering the Telerik controls globally in your project's Web.config file. This approach allows you to use the controls on any page without the need for the register directive:

To do that, open your web.config file and locate the system.web section:

<system.web>
    <pages>
        <controls>
                <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
        </controls>
    </pages>
 </system.web>

After this change, you can use <telerik:RadTextBox> and other Telerik controls directly in your markup without the need for the register directive on each page.


RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences