Archive for September, 2009

ASP.NET MasterPage Caching Issues

A MasterPage is cached by the WebServer to give faster response to the user.

The caching occurs the first time it is the corresponding ContentPage is invoked.

Due to this fact the LoginView inside a Masterpage would be updated on some pages and would fail to update on others,
giving inconsistent results.

The solution to this problem is that you need to use control as seen below.

<div class="loginstatus">
      <asp:Substitution runat="server" ID="substituteLoginInfo" MethodName="methodToInvoke" />
</div>

The thing with control is that you need to point it to a static Method on the Masterpage Codebehind

It has the following signature :

public static string methodToInvoke(HttpContext context)
{
   return DateTime.Now.ToLongTimeString();
}

This method will return a HTML string that will be substituted in the page, hence the name of the control.

I read this on Scott Guthrie ‘s website and he referred to as “dough-nut cache”.

Where the cream part of the dough-nut is the substitution control which is not cached :)

Post to Twitter

Tags: , , ,

Integration Silverlight UI with Tridion System – Introduction

Silverlight-Tridion Architecture

Silverlight-Tridion-Architecture

I’ll be writing a series of Blog posts that will show you how to Build a Silverlight UI on top of the SDL Tridion System.

The above diagram shows my proposed basic system of integrating Silverlight on top of Tridion.

The basic things to consider for this project are :

  • Create Silverlight Application that Communicates with WCF Webservice.
  • The WCF Webservice communicates with Tridion Interface.
  • Depending on the type of request it is handled by the TOM.NET API or TOM COM API.
  • The Tridion interface returns a response to the WCF Webservice.
  • The Webservice returns data to the Silverlight Application which shows the response to the user.

Post to Twitter

Tags: , , ,