ASP.Net and Ajax

AJAX (Asynchronous JavaScript and XML) is arguably one of the most hyped technology acronyms around. The primary advantage of using AJAX is that page refreshes can be minimized, allowing users to get the information they need quickly and easily through a more rich and functional interface. Ajax accomplishes this by using JavaScript and an XmlHttp object to send data asynchronously from the browser to the Web server and back.

ASP.Net Ajax Extensions

Microsoft’s ASP.NET AJAX Extensions provide developers with a quick and simple way to add AJAX functionality into any ASP.NET Website, without requiring in-depth knowledge of JavaScript or other AJAX technologies.

Visual Studio 2008 and above by default have AJAX extensions installed or you may download from microsoft site.

Ajax Extension provides 3 controls named “Timer”, UpdatePanel and UpdateProgress you can implement partial page submit using updatepanels.

ASP.Net Ajax Control Toolkit

The ASP.NET AJAX Control Toolkit  is an open-source project built on top of the Microsoft ASP.NET AJAX framework. It is a joint effort between Microsoft and the ASP.NET AJAX community that provides a powerful infrastructure to write reusable, customizable and extensible ASP.NET AJAX extenders and controls, as well as a rich array of controls that can be used out of the box to create an interactive Web experience.

The Ajax Control Toolkit contains more than 40 controls, including the AutoComplete, CollapsiblePanel, ColorPicker, MaskedEdit, Calendar, Accordion, and Watermark controls.

Don’t miss to check all controls in online demo at ASP.Net control toolkit samples.

Note : With ASP.Net ajax toolkit it is possible to have combobox having long text inside list items but fixed size combobox control. Check your self in above link.

Microsoft has published huge learning contents including videos and articles , explore your self to learn Ajax toolkit here.

Configure ASP.Net Ajax Toolkit :

  1. Download the latest release of the Ajax Control Toolkit from CodePlex.
  2. Unzip binary contents.
  3. Add tab to toolbox and choose item -> browse -> locate : AjaxControlToolkit.dll

Note : You may encounter problems when trying to use the Ajax Control Toolkit for the first time.
Asp.net Ajax Control Toolkit needs to be setup using its script manager and not the standard asp.net Script Manager.So one way to avoid the above issues is to drag the ToolkitScriptManager (found in the control toolkit) onto the Form tag and then use any other Ajax Controls.

HTA Widget – JCOMQuery

JComQuery is javascript framework library that simplifies HTA on windos (HTML trusted applications) development on windows. HTA’s are HTML based desktop applications. With JComQuery you can develop application in JavaScript (IDE Used will be Vs2008 and above including Express editions) with features like Widgets, irregular shape HTML windows, Multithreaded javascript tasks,asyc. Or background long running tasks, Email, zip , unzip functionality (using PKZIP),FTP classes,application themes (mac : default as theme) etc. Alone with JavaScript libraries the framework includes COM components written in VB 6.0 and VC++.The source code for each component is included in the series of articles written on my blog.
This post will include

  1.  JComCodeGenerator : Generating JavaScript wrapper code for COM interface that can be directly used to program with Intellisense features of VS2008 and above (including express editions) in javascript.The article also includes VB6 application which can read and COM interface and create Javascript library for HTA application.
  2. JComEventBridge : Library to route COM events to javascript library. The article includes VB 6 and VC++ libraries.The JComBridge acts as Bridge between HTML and COM libraries. By default there is no way to trap events generated by COM libraries (Except WScript engine).
  3. JComWindowsShaper : COM component written in VB6 which is used by JComQuery to create widgets and windows form effects like semitransparent, rounded rect windows etc.
  4. JComMultiThread : COM component to create long running background tasks.
  5. Base Java Script Libraries : JavaScrit base libraries to provide basic functionalities like email,threading etc.

If you are familier to .net CLR you can easily develop rich HTA applications with minial javascript and html (css) code.

All above mentioned components can be build into single ActiveX control and deployed as plugin to develop web based widgets application.The application will be limited on windows platform only.
Please visit again to see updates on this post …

Javascript framework for HTA : Introduction

Hope fully by next week i will publish Javascript framework for HTA (HTML trusted application) applications. The framework enables fast development in HTA based application with skin support. The default skin provided is for mac and can be customised easily just by changing skin css. Framework support email, FTP compression etc. from HTA application. The framework is capable to capture COM events in HTA application. Visual Studio 2008 express edition was used as code editor to enable intelligence in javascript and hence fast development. Some of the components used in framework are :

COM Bridge : Tech- VC++, VB 6.0 – COM event sink to capture events from COM and pass them back to HTA or Javascript.

JS COM Wrapper Code Generator: Tech – VB 6.0: Microsoft Visual Studio 2008 editor support Javascript intelligence with the help of commented xml tags. This tool generates wrapper javascript for any COM component which can be then used in your HTA page. The auto generated code emits xml tags alone with wrapper code. The wrapper code also takes care of event delegates etc.

Will also post some experience on loading data from database to html tables asynchronously to meet high performance in HTA application.

The framework was designed to develop small applications which will run with just HTML and javascript.