GoogleControl: Example of control for PageBox for .NET GoogleControl

for
Concept Presentation Install Use Internals

GoogleControl installation guide

Download

You can download GoogleControl from here.

The archive contains three directories, GoogleControl, GoogleControl2 and GoogleTest.

GoogleControl

Contains the HTTP and the include implementations.

The table below describes the most important files.

Name

Function

Global.asax.cs

Restores the GoogleControl.xml

ControlClient.aspx

Client implementation downloading the GoogleForm

ControlClient.aspx.cs

Client implementation downloading the GoogleForm

ControlCss.aspx

Page returning the CSS of the querying page to GoogleForm

ControlCss.aspx.cs

Returns the CSS of the querying page to GoogleForm

dotnet-include.aspx

Sample page to test GoogleInclude

GoogleForm.aspx

HTTP page for server page client

GoogleForm.aspx.cs

HTTP implementation for server page client

GoogleForm2.aspx

HTTP page for browser client

GoogleForm2.aspx.cs

HTTP implementation for browser client

GoogleInclude.aspx

Include page

GoogleInclude.aspx.cs

Include implementation

GoogleControl.xml

Example of configuration file

GoogleSearchService.cs

Google API proxy (from the Google developer guide)

The directory also contains:

  • Peer pages, resource and project files

  • CSS, images and Javascript needed by dotnet-include.aspx

GoogleControl2

Contains the ASP.NET implementation.

The table below describes the most important files.

Name

Function

GoogleControl.ascx

ASP.NET control page

GoogleControl.ascx.cs

ASP.NET control implementation

dotnet-control.aspx

Sample page using GoogleControl

GoogleSearchService.cs

Google API proxy (from the Google developer guide)

The directory also contains:

  • Peer pages, resource and project files

  • CSS, images and Javascript needed by dotnet-control.aspx

GoogleTest

Contains an example of page using the HTTP implementation.

The table below describes the most important files.

Name

Function

dotnet-get.aspx

Sample page using GoogleForm

ControlClient.aspx.cs

Client page downloading the GoogleForm (code behind dotnet-get.aspx – same as in GoogleControl directory)

dotnet-iframe.aspx

Sample page using GoogleForm2

GoogleControl.xml

Example of configuration file

See the internals page for more explanations.

Installation of the HTTP control

Inflate the following files of the archive’s GoogleControl directory on an IIS virtual directory:

ControlCss.aspx

ControlCss.aspx.resx

ControlCss.aspx.cs

GoogleForm.aspx

GoogleForm.aspx.resx

GoogleForm.aspx.cs

GoogleForm2.aspx

GoogleForm2.aspx.resx

GoogleForm2.aspx.cs

Global.asax

Global.asax.resx

Global.asax.cs

AssemblyInfo.cs

GoogleSearchService.cs

Web.config

Bin/GoogleControl.dll

ASP.NET must be installed on the IIS machine and the GoogleControl virtual directory must be configured as an application:

GoogleControl configured as an application on the IIS MMC

The pages that use the HTTP control can be in different directories, even on different machines or on different Application servers (PHP or J2EE).

Installation of the Include control

Inflate the following files of the archive’s GoogleControl directory on the same directory as pages that include the control:

GoogleInclude.aspx

GoogleInclude.aspx.resx

GoogleInclude.aspx.cs

Global.asax

Global.asax.resx

Global.asax.cs

GoogleSearchService.cs

Bin/GoogleControl.dll

For an installation through PageBox, you can configure the installation script to populate the directories of the pages that include the control.

Note:

You can also need to merge the Global.asax of the target directories with the control’s Global.asax. In that case it can be simpler to add the Global.asax.cs code to GoogleInclude.aspx.cs:

public class GoogleInclude : System.Web.UI.Page
{
    public static Hashtable pages = new Hashtable();
    public static void initialize(string referer, string path,
        bool checkRemote) {
        // Initialize code from Global.asax.cs
    }
}
public sealed class RefererItem
{
   // RefererItem from Global.asax.cs
}
Then recompile.

Installation of the ASP.NET control

Inflate the following files of the archive’s GoogleControl2 directory on the same directory as pages that include the control:

GoogleControl.ascx

GoogleControl.ascx.resx

GoogleControl.ascx.cs

GoogleSearchService.cs

Bin/GoogleControl2.dll

Contact:support@pagebox.net
©2001-2004 Alexis Grandemange. Last modified .