Call

Tag Archives: AJAX

Making web pages load faster by using Google’s AJAX Libraries

0
Filed under Web Developement

If you use a JavaScript framework like Mootools or jQuery, you may want to consider using Google’s AJAX Libraries. By utilising Google’s servers and distributing scripts across multiple hosts your webpage should load much quicker.

Firstly you will need to sign up for a Google API key for your website: http://code.google.com/apis/ajaxsearch/signup.html

Once registered, put the following in the header section of your web pages replacing the key parameter with you registered key.

<script type="text/javascript" src="http://www.google.com/jsapi?key=ABCDEFG"></script>

To use Google’s libraries use the google.load() function:
For jquery:

<script type="text/javascript">	
   google.load("jquery", "1.3.2");
</script>

For MooTools (replace 1.2.4 with the version that is required):

<script type="text/javascript">	
   google.load("mootools", "1.2.4");
</script>

Alternatively, you can also have an external link to the library:

For jquery:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

For MooTools:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

For a complete list of option, please see the Developer’s Guide http://code.google.com/apis/ajaxlibs/documentation/index.html#googleDotLoad

ASP.NET: Deploying an AJAX enabled application to SharePoint

0
Filed under ASP.NET, Microsoft, SharePoint

You may develop a web application that uses the ASP.NET AJAX Control Toolkit (http://www.asp.net/ajax/AjaxControlToolkit/Samples), if you plan to deploy this application to a SharePoint Server, you will need to complete the following steps:Copy the AjaxControlToolkit.dll to the BIN folder of the SharePoint server.

  1. Copy the AjaxControlToolkit.dll to the BIN folder of the SharePoint server.
  2. Edit the web.config file as below:
<SafeControls>
      <SafeControl Assembly="System.Web.Extensions, Version=3.5.0.0,     Culture=neutral, PublicKeyToken=31bf3856ad364e35"     Namespace="System.Web.UI" TypeName="*" Safe="True" />
</SafeControls>

<configSections>
    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
          <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
        </sectionGroup>
      </sectionGroup>
    </sectionGroup>
</configSections> 

<pages>
  <controls>
    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  </controls>
</pages>

<assemblies>
       <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>

<httpHandlers>
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>

<httpModules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>