• home
    • news & events
    • blog
  • über uns
    • projekte und referenzen
    • partner
    • produkte & technologien
    • offene jobs / stellen
    • veröffentlichungen
  • dienstleistungen & services
    • software design & architektur
    • software entwicklung
    • beratung / consulting
    • training, kurse und workshops
  • angebote
    • quick-starts
    • trainings und kurse
    • modulare sharepoint 2010 workshops
  • kontakt
Wir bieten SharePoint und .NET
Kompetenz, Erfahrung und Know-How:
"1stQuad guaranteed."
Diesen Blog abonnieren
Subscribe in NewsGator Online Add to My AOL
Add to Google Reader or Homepage Add to netvibes

Aktuelle Posts

Quick-Tipp: Publishing Site Settings
Update: Dynamisches Wiki Inhaltsverzeichnis
Chart Part für SharePoint 2010
SharePoint Content DB Migration -> Access denied
Konfigurieren von „Gefällt mir“ und Kategorien und Notizen

Archiv

Januar 2012 (4)
Dezember 2011 (2)
November 2011 (10)
September 2011 (3)
August 2011 (7)
Juli 2011 (1)
Juni 2011 (3)
Mai 2011 (6)
April 2011 (5)
März 2011 (8)
Februar 2011 (8)
Januar 2011 (4)
Dezember 2010 (5)
November 2010 (7)
September 2010 (6)
August 2010 (2)
Juli 2010 (11)
Juni 2010 (13)
Mai 2010 (11)
April 2010 (4)
März 2010 (6)
Februar 2010 (2)
Januar 2010 (6)
Dezember 2009 (4)
November 2009 (13)
Oktober 2009 (17)
September 2009 (2)
Juli 2009 (2)
März 2009 (2)
Januar 2009 (1)

1stQuad ist Microsoft Certified Gold Partner und bietet SharePoint und .NET Produkt- und Projekt-Kompetenz, -Erfahrung und -Know-How für Entwicklung, Architektur, Beratung, Schulung, Training und Kurse in Schweiz sowie Deutschland und Östereich.
1stQuad ist MatchPoint Partner und bietet MatchPoint Produkt- und Projekt-Kompetenz, -Erfahrung und -Know-How für Entwicklung, Architektur, Beratung, Schulung, Training und Kurse in Schweiz sowie Deutschland und Östereich.
1stQuad ist Nintex Partner und bietet Nintext SharePoint Workflows Produkt- und Projekt-Kompetenz, -Erfahrung und -Know-How für Entwicklung, Architektur, Beratung, Schulung, Training und Kurse in Schweiz sowie Deutschland und Östereich.
1stQuad ist Balesio Gold Partner und bietet SharePoint FILEMinimizer Produkt- und Projekt-Kompetenz, -Erfahrung und -Know-How für Entwicklung, Architektur, Beratung, Schulung, Training und Kurse in Schweiz sowie Deutschland und Östereich.
1stQuad Solutions ist Kentico Certified Solution Partner und bietet Produkt- und Projekt-Kompetenz, -Erfahrung und -Know-How für Entwicklung, Architektur, Beratung, Schulung, Training und Kurse in Schweiz sowie Deutschland und Östereich.
© 2011 1stQuad Solutions
Alle Rechte vorbehalten
> Impressum
Wir bieten Microsoft SharePoint und .NET Projekt- und Produkt-Know-how, Kompetenz und Erfahrung für Entwicklung, Architektur, Beratung, Schulung, Training und Kurse in Zürich, Bern, Basel, Schweiz sowie Deutschland und Östereich.

Blog > Juli 2009

Ajax Control Toolkit und ASP.NET Page Output Caching

Für moderne Benutzeroberflächen unter ASP.NET und natürlich auch SharePoint stellt das von Microsoft respektive der .NET Community zur Verfügung gestellte AJAX Control Toolkit wertvolle Komponenten und sogennante "Extender" zur Verfügung. Offiziell von Microsoft "not supported" ist es trotzdem möglich, AJAX Control Toolkit Komponenten zusammen mit dem ASP.NET Page Output Caching zu verwenden. Dieser Post zeigt wie's geht.

Veröffentlicht am 28.07.2009 13:30:58 von Michael Hofer mit 5 Kommentar(en)

Hinweis: Dieser Post wurde ursprünglich unter http://www.sharepointblogs.com/michael publiziert.


Using the ASP.NET page output caching can lead to problems with the AJAX Control Toolkit. You might see error messages such as

Javascript error: AjaxToolkit is undefined

While searching the web, i have found many people with the same problem, however no solution. Many even pointed to a post on Microsoft Connect that concludes with the following statement: "We do not support output caching in combination with ScriptControls, Extenders, or ScriptManagerProxies that need ScriptReferences at this time."

However, there IS a way to make it actually working. Loren Halvorson finally brought me on the right path. While the post is mainly about how to speed up the loading time of AJAX Control Toolkit controls it includes an IHttp-Handler that will allow to use the CombineScriptsHandlerUrl property of the ToolkitScriptManager. I will try to explain the background and how I've implemented it within a SharePoint environment.

When working with the AJAX Control Toolkit it is advisable to use the ToolkitScriptManager control instead of the standard ASP.NET ScriptManager because it allows (amongst other advantages) script.combining. For more details I recommend the this reading. The ToolkitScriptManager loads all necessary JavaScripts from the SAME url the current page is of, it simply appends query-string parameters to it which will be recognized by the standard handler and the client-side scripts are returned. The problem is that: When ASP.NET page output caching is enabled and a request is issued to a cached page, there will be no server-side processing, only the cached raw HTML will be returned insted of the Javascript files.

By implementing a custom IHttpHandler to serve the Javascript files you can avoid this problem as the scripts are returned from a different URL. In my SharePoint scenario I used the CombineScriptsHandler from Loren and put it into the _layouts-Folder in the 12-hive. From then on I could turn on page output caching without any problems. This is the ToolkitScriptManager markup i'm using:

 <%@ Register TagPrefix="act" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit, Version=3.0.20820.25802, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" %>

 <act:ToolkitScriptManager ID="scriptManager" runat="server" ScriptMode="Release" CombineScripts="true" CombineScriptsHandlerUrl="/_layouts/custom/CombineAjaxToolkitScriptsHandler.ashx" AsyncPostBackTimeout="320" EnableHistory="True" EnableScriptGlobalization="true" EnableScriptLocalization="true" EnablePartialRendering="true" EnableViewState="true" />

Kommentar
essay
I didn't know I could combine my scripts. Earlier I had to do it by hands. Sometimes it was easier to write a new script...
16.11.2010 14:14:55

college papers
this is amazing i found it very useful
22.04.2011 13:05:34

research paper example
very interesting article! I will follow your themes. Can I subscribe to your posts on Twitter or on your Facebook profile?
22.06.2011 10:56:10

Urhines Kendall
Very interesting post! Technological progress makes us change and there's no getting around it.
12.08.2011 03:07:19

negozio strumenti musicali
This frees the AJAX Control Toolkit contains several important fixes, and adds a new HTML editor for the extender control. The new HTML editor control is compatible with HTML 5, and operates the latest versions of all modern browsers like Mozilla Firefox, Apple Safari, Google Chrome and Internet Explorer 6 and above.
17.08.2011 11:24:48

Kommentar hinterlassen



 Security code
Zurück, Seite drucken