America/US Samples
Europe Samples
Asia Samples

Async Ajax Google Search

Here we demonstrate how to build an ajaxified, async search with several search sources. In this case it fires of 6 different Google searches that search separate ares of our website. It makes use of the Page.RegisterAsyncTask method in ASP.NET. With this method you can register multiple asyncron tasks to your ASP.NET page.
When all 6 searches have returned, they fill the accordion with each of the results.
This sample also makes us of the the Gaia BrowserHistory control, which lets you subscribe to the navigation of the browser and implement the functionality the user would expect on a web page.

Updating...



Markup (ASPX/.aspx)

   1:   
   2:      <gaia:Panel 
   3:          runat="server"
   4:          ID="pnlSearchArea"
   5:          DefaultButton="btnSearch"
   6:          GroupingText="Search Gaiaware.Net"
   7:          style="margin-top:5px;">
   8:          <gaia:Image
   9:                  runat="server"
  10:                  ID="updateControl"
  11:                  ImageUrl="~/media/contentImages/ajax-loader.gif"
  12:                  style="position:absolute; right: 25px;"
  13:                  AlternateText="Updating..." />
  14:          <div style="margin: 7px;">
  15:              <gaia:TextBox 
  16:                  runat="server" 
  17:                  ID="txtSearch" 
  18:                  OnTextChanged="DoSearch" 
  19:                  AutoPostBack="True" 
  20:                  KeyChangeEvents="True" />
  21:              <gaia:Button 
  22:                  runat="server" 
  23:                  ID="btnSearch" 
  24:                  onclick="DoSearch" 
  25:                  Text="Search" />
  26:              <gaia:Label
  27:                  runat="server"
  28:                  ID="lblErrorMsg"
  29:                  ForeColor="Red" />
  30:          </div>
  31:      </gaia:Panel>
  32:      <br />
  33:      <gaia:Accordion 
  34:          ID="acc" 
  35:          runat="server"
  36:          Visible="false" 
  37:          ForceOnlyOne="true"
  38:          OnToggled="acc_OnToggled" />
  39:      <br />
  40:      <gaia:BrowserHistory 
  41:          id="zHistory" 
  42:          runat="server" 
  43:          OnNavigated="zHistory_Navigated">
  44:      </gaia:BrowserHistory>
  45:   
  46: