Using ASP.NET AJAX Control Extenders in VS 2008

Scott Guthrie again shows one of the new feature of the new Visual Studio 2008 which is the improved designer support for ASP.NET AJAX Control Extenders.

What are ASP.NET Control Extenders?

ASP.NET Control Extenders are controls that derive from the System.Web.UI.ExtenderControl base class, and which can be used to add additional functionality (usually AJAX or JavaScript support) to existing controls already declared on a page. They enable developers to nicely encapsulate UI behavior, and make it really easy to add richer functionality to an application.

The ASP.NET AJAX Control Toolkit is a great example of a project that takes advantage of this control extender functionality. It includes more than 40+ free control extenders that you can easily download and use to add AJAX functionality to your applications.

For example, let’s assume we wanted to have a textbox on a page where a user could enter a date:

step1 Using ASP.NET AJAX Control Extenders in VS 2008

If the browser has JavaScript enabled, we might want to have a nice client-side calendar date picker appear when the user sets the focus on the date textbox to help with selecting the date:

step2 Using ASP.NET AJAX Control Extenders in VS 2008

Enabling this is trivial using the ASP.NET AJAX Control Toolkit. Just add the “CalendarExtender” control that ships with it to the page and point its “TargetControlID” property at the :

step3 Using ASP.NET AJAX Control Extenders in VS 2008

The CalendarExtender now automatically emits an ASP.NET AJAX javascript client script that adds the client-side calendar behavior to the TextBox at runtime. No additional code is required.


Using ASP.NET AJAX Control Extenders in VS 2008

With VS 2005 you had to manually wire-up control extenders yourself (either via source-view or via the property grid).

VS 2008 makes it even easier to discover and attach control extenders to your controls.
read original

Related posts:

  1. New ASP.NET AJAX Control Toolkit Release
  2. Updated ASP.NET AJAX Control Toolkit Release and New ASP.NET AJAX Videos/Articles
  3. ASP.NET Ajax in-depth performance analysis
  4. Enhance your Website with ASP.NET AJAX Extensions
  5. LINQ to SQL (Part 5 – Binding UI using the ASP:LinqDataSource Control)

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

Read previous post:
Украсяване с jQuery

Здравейте, днес ще разгледаме как да правим красиви краища на HTML елементите. За целта ще използваме jQuery което е JavaScript...

Close