using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml; using com.google.api; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void cmdGo_Click(object sender, EventArgs e) { // Create a Google Search object GoogleSearchService myService = new GoogleSearchService(); // Invoke the search method GoogleSearchResult myResults ; myResults = myService.doGoogleSearch( "[YOUR ID HERE]", this.txtKeywords.Text, 0, 10, true, "", true, "", "", ""); // Prep the results area lblResults.Text = "
    "; // Loop through each result and display it foreach (ResultElement myResult in myResults.resultElements) { lblResults.Text += "
  1. " ; lblResults.Text += myResult.title ; lblResults.Text += "
    "; lblResults.Text += myResult.snippet + "

  2. "; } lblResults.Text += "
"; } }