Telerik RadControls in Microsoft ASP.NET MVC

Posted by: the telerik blogs, on 02 Oct 2008 | View original | Bookmarked: 0 time(s)

To continue with my previous blog post about RadGrid for ASP.NET AJAX in Microsoft ASP.NET MVC, I've made another example how to use RadControls for ASP.NET AJAX as pure client-side components in this environment. The biggest challenge here is the ScriptManager and scripts registration in general. By default the creation of client-side components is so tightly coupled with the ajax functionality (PageRequestManager) that the only way to enable this is to inherit from ScriptManager (or RadScriptManager) and build everything manually:

protected override void Render(HtmlTextWriter writer)
{
foreach (RegisteredScript script in GetRegisteredClientScriptBlocks())
{
if (Page.Items[script.Key] == null)
{
Page.Items[script.Key] = true;

if (script.ScriptType == RegisteredScriptType.ClientScriptInclude)
{
writer.WriteLine(String.Format(@"<script type="text/javascript" src="{0}"></script>", HttpUtility.HtmlEncode(script.Url)));
}
}
}

...

}

The result: Fully functional client-side enabled RadControls for ASP.NET AJAX with skins, scripts and styles combination, etc.!

Untitled

Untitled3Untitled2 Untitled4

Untitled5Untitled6

Enjoy!

[Download]

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1417 | Hits: 15

Similar Posts

  • Connecting to SQL Azure with Telerik OpenAccess more
  • Get Ready for Teleriks Custom-built Extensions for ASP.NET MVC more
  • Adding IIS Manager Users and Permissions using PowerShell more
  • Important releases from Microsoft you may have missed more
  • WebAii Testing Framework Support for Extended Silverlight RadControls more
  • MvcContrib working on Portable Areas more
  • Binding Hierarchical RadGrid for ASP.NET Ajax with Telerik OpenAccess ORM more
  • Telerik Releases New Controls for Silverlight 3 and WPF more
  • Using the Telerik OpenAccess WCF Wizard with Multiple Versions of OpenAccess more
  • Telerik Announced Official Version of Visual Style Builder for AJAX Controls 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