If you're working with Gaia Ajax Widgets in your EPiServer project, you need to read this blog post. In short, it fixes a problem where the Gaia callbacks are done in the context of your start page instead of the currently loaded page.
The funny thing is that Gaia works with EPiServer out of the box, and this problem only manifests itself if you are trying to work with the page data (via the CurrentPage property on your template for an example). The default behaviour in EPiServer is to populate CurrentPage with the start page if no page id can be found when a web form (your template) is loaded. If you use Gaia to show other types of data, this will not be a problem for you.
It is not a bug in Gaia, nor in EPiServer, but the combination of these two and the Friendly Url rewrite module in CMS 5 led to some confusion. When Gaia makes callbacks, it uses the url of the currently loaded web form (just as most ajax frameworks for ASP.NET). I would guess that the url is retrieved from the Request.Url property, perfectly normal. In CMS 5, this will be the "real" url of the request (like /templates/page.aspx?id=123), not the friendly one, and for some reason, if you try to use this url in your request (or callback) the Friendly Url module will choke (and remove the id part).
Don't really know why, as this is how the server would actually like to see it, but I guess this could mix up things on a different level. When Friendly Urls are enabled, you're not really supposed to send the id=123 in as a querystring, someone could use this to trick EPiServer into loading another page than the one mapped to the friendly url for an example.
I downloaded Gaia to try to reproduce this, and see if I could make a workaround. I have to say - from previous experiences with ajax frameworks, I was expecting some work in order to get things up and running (with EPiServer.) Ajax frameworks are usually quite advanced in how they interact with the request framework in ASP.NET, and the same can be said about EPiServer, and the combination can be lethal.
Not so with Gaia. It just worked. I installed it (see this if you have problems with the Visual Studio integration) added a few Gaia controls to my masterpage (a label and a button), added a button click event and wrote a timestamp to the label.
<%@ Register Assembly="Gaia.WebWidgets"
Namespace="Gaia.WebWidgets"
TagPrefix="gaia" %><gaia:Panel ID="Panel1" runat="server" DefaultButton="Button1">
Page Retrieved: <%= DateTime.Now.ToString("hh:mm:ss fff") %>
<br />
<gaia:Label ID="lblGaiaLabel"
runat="server">Gaia Label</gaia:Label>
<br />
<gaia:Button ID="Button1"
runat="server"
OnClick="Button1_Click"
Text="CallBack" />
</gaia:Panel>
Server side:
protected Gaia.WebWidgets.Label lblGaiaLabel;
protected void Button1_Click(object sender, EventArgs e)
{
lblGaiaLabel.Text =
"CurrentPage Name: " +
((PageBase)this.Page).CurrentPage.PageName +
" - Called: " +
DateTime.Now.ToString("hh:mm:ss fff");
}
When I dragged the controls to my masterpage, it registered a reference to the Gaia.WebWidgets assembly automatically. I just copied the license file from the C:\Program Files\Gaia Ajax Widgets 2008 Q2 Glory BETA1 Developer\Licenses folder to the root of my site, compiled, and it worked. Well, except for the fact that it always gave me the name of the start page, regardless of the page I was actually looking at.
Read the Gaia blog for the fix.
I love EPiServer because it does not get in the way, the architecture follows the general ASP.NET architecture and flow, and if something does not work the way I'd like or expect, I can work around it - on many different levels. My first impression of Gaia is the same, if your architecture is good, it should be simple, and it should just work. It does. If you're thinking about ajax, have a look at Gaia.