How do telerik controls work ?

2 posts, 0 answers
  1. Jon Hobbs
    Jon Hobbs avatar
    48 posts
    Member since:
    May 2007

    Posted 17 Dec 2007 Link to this post


    Quite a general question this. I've been trying to learn a little more about how Telerik controls actually work in my applications as it's often been a source of confusion for me, particularly the way you guys seem to embed Javascript/css inside the controls.

    So, when I place a Telerik control on the page (which I assume is an ASP.NET custom control) it basically creates a lot of HTML which I can see but a lot seems to be hidden.

    For example, there seems to be a hidden input field called "ControlName_ClientState" , what is held in this? and is it possible to access client side variables without having to use client side methods ?

    Also, if I don't supply a skin name the default skin seems to be embedded in the control too. Presumably this is why my source code contains lots of lines that look like this ......

    <script src="/demos/aspnet/Prometheus/ScriptResource.axd?

    Sorry for all the newbie questions but I can't be the only person  on here that would benefit from a deeper understanding of what happens when I use telerik controls.


  2. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 17 Dec 2007 Link to this post


    I am happy to see your eagerness to learn more about the controls. It's always a good idea to understand what's happening under the hood with your components.

    In general, the RadControls for ASP.NET are "just" custom server controls, though very advanced and complex custom controls. If you Google "ASP.NET custom controls", you'll find tons of articles talking about how custom controls are built and that will go a long way to helping you understand the inner working on Telerik's controls.

    The default skins and controls scripts are stored in the controls assemblies via a feature new to .NET 2 called "embedded web resources". This feature of the framework enables you to embed files in an assembly and then reference them via the syntax you noted (ScriptResource.axd). It makes it much easier to deploy a control because you need only copy one assembly vs an assembly and many JavaScript/CSS/images files.

    Finally, when manipulating data on the client, it always best to use the control's client-side API vs. trying to hack the hidden "helper" fields yourself. The client-side APIs for all RadControls are very rich and enable you to do quite a bit without involving the server and they give you the benefit of keeping the control's state in sync with the server.

    Hopefully that helps answer a few of your questions. Definitely start reading some articles online about custom control development to continue your learning and feel free to ask more questions if you have them.

  3. Telerik UI for ASP.NET Core is out
Back to Top