Rapid ASP.NET Development using Ajax Control Toolkit

November 12th, 2012 Leave a comment Go to comments

Weathering the storm of development technologies that are born and die every passing day, ASP.NET has stayed firmly rooted and powers many a web application that successfully runs today. For an offshore software development company, the primary concern is completion of development within timeframes and with the expected quality. The Ajax Control Toolkit does exactly this by providing an array of controls that when embedded into web pages make them come alive with high interactivity and lightning-fast response. Features, such as AutoComplete, CollapsiblePanel, Calendar, Accordion and HTML Editor Extender go a long way towards simplifying and catalysing web application development.

The latest version of the Ajax Control Toolkit brings forth many new features including the icing on the cake for every ASP.NET development company – support for ASP.NET 4.5! Using this toolkit with ASP.NET 4.5 is simple, but it does require a proper sequence of steps to be followed:

  • Create a new website using ASP.NET 4.5 in Visual Studio 2012. You can use the Web Forms application template which renders a simple starter website with predefined content.
  • In this example, we shall see how to add the Calendar control to your sample website home page. Install Ajax Control Toolkit using NuGet by simply executing this command from the Package Manager Console:

Install-Package AjaxControlToolkit

  • Locate the References folder in the Solution Explorer window and search for Ajax Control Toolkit. Click the “Install” button and watch the toolkit being added to your project in a flash!
  • Now, let’s get cracking! Open the default.aspx page and delete everything in the BodyContent ID. Add the following to get the calendar option on your web page:

<ajaxToolkit:CalendarExtender TargetControlID=”vDate” runat=”server” />

  • 99% of the time, Intellisense will automatically popup as the Calendar Control is being typed out. In case it doesn’t exit the web page and re-open it.
  • If you execute your web app right now with the Visual Studio Debugger, you will get an error message stating “MsAjaxBundle is not a valid script name”. It happens because the Master Page is still holding on to the default ScriptManager and needs to be configured to use ToolkitScriptManager.
  • Locate and open the Site.Master file and sift through to find the ScriptManager declaration. Now, we need to ensure that 3 changes are made:
  1. asp:ScriptManager is replaced with ajaxToolkit:ToolkitScriptManager
  2. MsAjaxBundle bundle is deleted from ScriptReferences
  3. Assembly=”System.Web” attributes are deleted from ScriptReferences

If all goes well as described above, your web app should be up and running successfully with a text field that expands into a calendar when clicked on. We are an offshore software development company always on the lookout for innovative way to cut down ASP.NET development timeframes while maintaining high-quality results. As an ASP.NET development company, our record and list of elite clientele speak for themselves. If you are looking to hire .NET developers, look no further than our extensively skilled team of .NET programmers with tons of experience.

  1. No comments yet.

Leave a reply

 
 
 


× 3 = eighteen