AJAX Control Toolkit, NuGet Package Manager Console and the new HTMLEditorExtender Control

Its been a while since I played with Web forms, AJAX stuff.  I was curious in checking out, particularly how the AJAX Control Toolkit which used to be my favorite in the past Smile is evolving.

There is a new release of AJAX Control Toolkit, just hot off the oven.  You can download the binaries from http://ajaxcontroltoolkit.codeplex.com/ 

Now, while the regular way we have downloaded and used AJAX Control Toolkit is by visiting the above codeplex page and download the latest version, there is also a newer and simpler approach with the NuGet Package Manager in Visual Studio 2010.  NuGet package manager is a repository of binaries, applications that can be downloaded and used in your Web forms / MVC Applications.

I wanted to try out install AJAX Control Toolkit from the Package Manager Console.  So, I went ahead and created a “File – New Project – ASP.NET Web Application”.  Once you install the NuGet Package Manager from http://nuget.org/ you will get 2 ways to install libraries from NuGet.  One, is typically from the Project’s right click menu – Manage NuGet Package.

image 

The other way, my favorite, is through the Package Manager Console, a powershell based extension for Visual Studio

image

Once you select the “Package Manager Console” form the menu, the following prompt appears in the bottom (next to Build/Output Windows)

image

From there, I typed “Install-Package AJAXControlToolkit” and hit enter.  It successfully installed the latest version and also made the necessary entries, to the web.config file

image

Only thing is, you need to build the project for Visual Studio to pick intellisense for Toolkit. 

Post that, I wanted to try the new HTMLEditorExtender Control.  I added the ToolScriptManager to the page and then added a TextBox and also added the HTMLEditorExtender to it.

image

Then, when I ran the page, I got the nice HTML Editor for my TextBox where I could enter formatted text as below:-

image

Sweet, right Smile

Now, the first question that one would ask is, wasn’t there an Editor Control already in Toolkit.  Indeed, its still there.  But this one uses HTML5 Content-Editable feature enabled in the modern browsers.  It also is less in terms of markup foot print.

Infact, Stephen Walther has a detailed post explaining the difference.  Also, it is advised to use the Anti-XSS Library in combination to avoid script injections.  Read the post at http://stephenwalther.com/blog/archive/2011/08/01/ajax-control-toolkit-july-2011-release-and-the-new-html.aspx

I liked this control so much that, I thought I would revive my series on Web Forms Smile

Cheers !!!

Print | posted on Monday, August 8, 2011 8:02 PM

Comments on this post

# re: AJAX Control Toolkit, NuGet Package Manager Console and the new HTMLEditorExtender Control

Requesting Gravatar...
what about the bloatware (viewstate) it adds ?
Left by Mr.MVC on Aug 08, 2011 8:48 PM

# re: AJAX Control Toolkit, NuGet Package Manager Console and the new HTMLEditorExtender Control

Requesting Gravatar...
Great Article Harish. It is really cool.. Nice thought of using a toolkit for webpages. This is just awesome...
Left by Anuradha on Aug 09, 2011 7:40 AM

# re: AJAX Control Toolkit, NuGet Package Manager Console and the new HTMLEditorExtender Control

Requesting Gravatar...
What if we want to change the BackColor of the Text Box to a different colo?Is it possible?
Left by Sravanthi on Aug 10, 2011 11:42 PM

# re: AJAX Control Toolkit, NuGet Package Manager Console and the new HTMLEditorExtender Control

Requesting Gravatar...
There is a new release of AJAX Control Toolkit, you have described it's utilities in graphic manner so every one can understand about it easily.
Left by real estate for sale in richmond on Sep 14, 2011 12:21 PM

# re: AJAX Control Toolkit, NuGet Package Manager Console and the new HTMLEditorExtender Control

Requesting Gravatar...
Ok, but it doesn't run if there's a masterpage (within content place holder)...
Left by Mauro on Jan 31, 2012 3:42 PM

# re: AJAX Control Toolkit, NuGet Package Manager Console and the new HTMLEditorExtender Control

Requesting Gravatar...
Blog make clear wonderfully great after i login on the net and please good us something similar blog on the net.
Left by New Jersey Hotels for lease on Feb 12, 2013 2:36 PM

Your comment:

 (will show your gravatar)