Performance tip: using sprites with navigational RadControls

Posted by: the telerik blogs, on 23 Jul 2008 | View original | NEW Bookmarked: 0 time(s)

As a strong believer in sprites, I was inspired from a question that came up in a forum thread earlier this week, namely: how to use sprites in a RadTreeView? Well, I think it's rather limiting to write only about the RadTreeView, so this post discusses the technique for all of the navigational RadControls.

screenshot

You can download the sample page and give it at try. Most of the code is quite straightforward - simply setting the CssClass property and a few layout adjustments. Please note, however, that this CSS is tightly bound to the skin that is currently used, so changing skins might not work (to be more specific, it won't work for skins that set background images to the text nodes).

Why go through all the pain? Well, great performance boost for every instance of RadControls that uses it - by both minimizing the HTTP request count and optimizing the HTML output of the control.

Oh, and... I would like to give some credit to Mark James, who created the wonderful Silk icon set that was spritified. Slickedy-slick!

Advertisement
Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 347 | Hits: 13

Similar Posts

  • Performance tips... more
  • Optimization Tips: Optimizing Custom Skins more
  • ASP.NET Connections Slides + Demos more
  • Tips/Tricks and LINQ Slides+Demos from my Talk in Dallas more
  • ASP.NET 2.0 Tips and Tricks and ASP.NET, IIS7 and ASP.NET AJAX End to End Talks more
  • ASP.NET Tips and Tricks and LINQ Slides/Demos from CodeMash more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD