• home
    • news & events
    • blog
  • über uns
    • projekte und referenzen
    • partner
    • produkte & technologien
    • offene jobs / stellen
  • dienstleistungen & services
    • software design & architektur
    • software entwicklung
    • beratung / consulting
    • training, kurse und workshops
  • sharepoint 2010 workshops
    • module
    • anmeldung
  • 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

State Machine Workflow mit InfoPath Formularen für SharePoint 2010 – Teil 7
State Machine Workflow mit InfoPath Formularen für SharePoint 2010 – Teil 6
State Machine Workflow mit InfoPath Formularen für SharePoint 2010 – Teil 5
State Machine Workflow mit InfoPath Formularen für SharePoint 2010 – Teil 4
State Machine Workflow mit InfoPath Formularen für SharePoint 2010 – Teil 3

Archiv

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)

Als Microsoft Certified Partner bietet 1stQuad Solutions SharePoint und .NET Kompetenz, Erfahrung und Know-How für Entwicklung, Architektur, Beratung, Schulung, Training und Kurse in Zürich, Bern, Basel, Schweiz sowie Deutschland und Östereich.
Als Spezialist für kleine und mittlere Unternehmungen (KMU) bietet 1stQuad Solutions SharePoint und .NET Produkt- und Projekt-Kompetenz, -Erfahrung und -Know-How für Entwicklung, Architektur, Beratung, Schulung, Training und Kurse in Zürich, Bern, Basel, Schweiz sowie Deutschland und Östereich.
Mit Kentico CMS bietet 1stQuad Solutions neben SharePoint und .NET CMS-Produkt- und Projekt-Kompetenz, -Erfahrung und -Know-How für Entwicklung, Architektur, Beratung, Schulung, Training und Kurse in Zürich, Bern, Basel, Schweiz sowie Deutschland und Östereich.
© 2010 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 0 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
Dieser Blog-Eintrag wurde noch nicht kommentiert.
Kommentar hinterlassen



 Security code
Zurück, Seite drucken