Click here to Skip to main content
15,885,767 members
Articles / Web Development / HTML

Magic AJAX: Applying AJAX to your existing Web Pages

Rate me:
Please Sign up or sign in to vote.
4.82/5 (72 votes)
28 May 2007MIT12 min read 967.3K   2.7K   251  
How to apply AJAX technologies to your web pages without replacing ASP.NET controls and/or writing JavaScript code.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>

	<configSections>
		<section name="magicAjax" 
				type="MagicAjax.Configuration.MagicAjaxSectionHandler, MagicAjax"/>
	</configSections>
	
	<!-- MagicAjax configuration :
		[Optional] scriptPath - Alternative path for "AjaxCallObject.js"
					If omitted, the embedded "AjaxCallObject.js" file is used (default).
					example: <magicAjax scriptPath="~/script" />
		outputCompareMode - "HashCode" : Use String.GetHashCode() to find changed Html output
						"MD5" : Use MD5 hashing to find changed Html output (slower and larger in size, but practically no collisions)
						"FullHtml" : Use the complete Html output to find changes (for debugging purposes only)
					Default is "HashCode"
		tracing - "true" : When an AjaxCall is invoked a popup window displays the data that were sent
						to the server and the data that the client received. Used to monitor the traffic of AjaxCalls.
				"false" : tracing is disabled (Default).
		pageStore/mode - "NoStore" : Doesn't store the page object, it is recreated for each AjaxCall
						"Session" : Saves the page object in session, works only for "InProc" SessionState
						"Cache"   : Saves the page object in cache
					Default is "NoStore"
		pageStore/unloadStoredPage - "false" : if the page is stored (mode is "Session" or "Cache")
											the page object is kept until session or cache expires
									"true : An AjaxCall is invoked at the unload event of the
											client's page for the server to drop the stored page object.
								Default is "false"
		pageStore/cacheTimeout - The time in minutes that the page will be kept in cache, if "Cache" is
					selected for pageStore. Default is 5
		pageStore/maxConcurrentPages - if the page is stored (mode is "Session" or "Cache") it defines
					the maximum number of page objects that can refer to the same page. Default is 5.
		pageStore/maxPagesLimitAlert - if it's true, an alert box is displayed when the maxConcurrentPages
					limit is reached. Default is false  -->
	<magicAjax
		outputCompareMode="HashCode"
		tracing="false">
		<pageStore
			mode="NoStore"
			unloadStoredPage="false"
			cacheTimeout="5"
			maxConcurrentPages="5"
			maxPagesLimitAlert="false"
		/>
	</magicAjax>

  <system.web>

        <httpModules>
             <add name="MagicAjax" type="MagicAjax.MagicAjaxModule, MagicAjax" /> 
        </httpModules>

 </system.web>

</configuration>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Web Developer
Greece Greece
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions