Getting Started with AJAX, ASP.NET 2.0 and C#
Introduction
In this article I will explain how you can integrate the AJAX framework into a web site and very easily create an AJAX enabled web site within Visual Studio 2005 utilizing C#.
What this article will try to do is help point you to the helpful web sites available and condense your search and learning curve with AJAX as far as what it is, where do I find it and once I do find it how does it work. I will try to show you where you can find the various articles and videos that go into great detail on the vast functionality available with AJAX. In our next article in this series I will show you a simple example of using this framework to create a PasswordStrength validation process.
Try Server Intellect for Windows Server Hosting. Quality and Quantity!
Let’s start with what is AJAX and what can I do with it?
ASP.NET AJAX is a free framework for quickly creating efficient and interactive Web applications that work across all popular browsers.
With ASP.NET AJAX you can:
- Create interfaces with AJAX components that can be reused.
- Upgrade your existing pages with AJAX controls.
- AJAX comes with support for all modern browsers
In a way and strictly speaking AJAX itself is not a technology, it mixes well-known programming techniques in a unique and uncommon way to enable programmers to develop Internet applications with a “WinForms” look and feel and a much more appealing user interface than we were able to develop in the past.
What we will learn in this article:
- What is AJAX
- How to find all of the necessary downloads for AJAX
- How to find the easy to follow tutorials at ASP.NET
- How to setup our environment with AJAX
Please Note:
AJAX functionality is integrated in ASP.NET 3.5 and does not require any additional downloads. If you are using ASP.NET 3.5 this article does not apply to you.
Getting Started with AJAX
Server Intellect assists companies of all sizes with their hosting needs by offering fully configured server solutions coupled with proactive server management services. Server Intellect specializes in providing complete internet-ready server solutions backed by their expert 24/365 proactive support team.
Before we begin coding we will need to download the AJAX framework and install it onto our system in order to have the framework available for us to create our first AJAX web project. You can find out everything you need to know regarding AJAX at:
http://www.asp.net/
This web site is where you will find information on ASP.Net and AJAX, there are numerous articles, books, downloads and tutorials available on this site that will help guide you through the different options that AJAX offers for your web development.
You can find a helpful tutorial at ASP.NET that will help explain “How you get started with AJAX”. This video will help guide you through the process step by step and is very informative. You can find this video at:
http://www.asp.net/learn/ajax-videos/video-75.aspx
In order to use AJAX you will need to first install the “ASP.NET AJAX Extensions 1.0” and the “ASP.NET AJAX Control Toolkit” found on the ASP.NET web site mentioned earlier in the article. When you get to ASP.NET site you will need to click on the “AJAX” link to get to the home page for AJAX. Once you are on the home page click on the “Downloads” link to get to the ASP.NET AJAX Control Toolkit.
The download site is located at:
http://www.asp.net/ajax/downloads/
The first file you will need to download and install to utilize the functionality within AJAX is the “ASP.NET AJAX Extensions 1.0”. The extension setup package is the framework for AJAX and needs to be installed before the ASP.NET AJAX Control Toolkit.
The second file you will need to download and install is the ASP.NET AJAX Control Toolkit which holds the controls that you will use in your application. When these controls are added to your Toolbox panel you will be able to drop these controls onto your web page exactly like you would with the controls that come as part of Visual Studio. Here is what you need to do to install the ASP.NET AJAX Control Toolkit.
If you're looking for a really good web host, try Server Intellect - we found the setup procedure and control panel, very easy to adapt to and their IT team is awesome!
Configure Visual Studio 2005
- The first step in our process is to create a new web site from the ASP.NET AJAX web site template by opening the "File" menu, and clicking "New Web Site...", and selecting the "ASP.NET AJAX-Enabled Web Site" under "Visual Studio Installed Templates".
Fig. 1
[Click to see full-size]
- The second step in our process is to add a tab by right-clicking on the Toolbox and choosing the "Add Tab option.
We used over 10 web hosting companies before we found Server Intellect. Their dedicated servers and add-ons were setup swiftly, in less than 24 hours. We were able to confirm our order over the phone. They respond to our inquiries within an hour. Server Intellect's customer support and assistance are the best we've ever experienced.
Fig. 2
- Add a tab and name it "AJAX Control Toolkit”.
Fig. 3
- Inside the tab you just added right-click on the Toolbox and select the "Choose Items...” option.
Fig. 4
- When the dialog box appears, click the "Browse..." button and browse to the directory where you installed the ASP.NET AJAX Control Toolkit. In that directory you will find a sub-directory called "SampleWebSite", and under that another sub-directory called "bin". Inside that sub-directory, choose the "AjaxControlToolkit.dll" and click OK. Close the Dialog box.
If you're ever in the market for some great Windows web hosting, try Server Intellect. We have been very pleased with their services and most importantly, technical support.
Fig. 5
[Click to see full-size]
- You have now completed all of the required steps and you can now use the included sample controls in your web sites!
You can find a helpful tutorial for the ASP.NET AJAX Control Toolkit at ASP.NET that will help explain “How Do I Get Started with the ASP.NET AJAX Control Toolkit?” This video will help guide you through the process step by step and is very informative. You can find this video at:
http://www.asp.net/learn/ajax-videos/video-75.aspx
There are various other files for AJAX that can be downloaded, but these two files are the main two files required to setup your environment.
After completing the above installations you should have the following controls within your “Ajax Control Toolkit” tab in your Toolbox panel.
- Accordion
- AlwaysVisibleControl
- Animation
- AutoComplete
- Calendar
- CascadingDropDown
- CollapsiblePanel
- ConfirmButton
- DragPanel
- DropDown
- DropShadow
- DynamicPopulate
- FilteredTextBox
- HoverMenu
- ListSearch
- MaskedEdit
- ModalPopup
- MutuallyExclusiveCheckBox
- NoBot
- NumericUpDown
- PagingBulletedList
- PasswordStrength
- PopupControl
- Rating
- ReorderList
- ResizableControl
- RoundedCorners
- Slider
- SlideShow
- Tabs
- TextBoxWatermark
- ToggleButton
- UpdatePanelAnimation
- ValidatorCallout
We are using Server Intellect and have found that by far, they are the most friendly, responsive, and knowledgeable support team we've ever dealt with!
What we have Learned
We have learned that we can easily find the necessary downloads required for AJAX to be setup in our environment and how to install these downloads and configure AJAX so we can use it in developing our applications. We have also seen the various controls that are part of the AJAX package and that we can find helpful “How-to” videos on AJAX and ASP.NET and the www.asp.net web site.
Acknowledgements
I use this site frequently and so should you, go to www.asp.net. Their reference material was very helpful when it came to researching this article.
Attachments
There are no attachments with this article. Please refer to the above mentioned links to access the various downloads referenced in this article.