Example #1
0
        /// <summary>
        /// Cache button: look up a URL in the Google cache, display size of page
        /// </summary>
        private void cacheButton_Click(object sender, System.EventArgs e)
        {
            // Create a Google Search object
            GoogleSearchService s = new GoogleSearchService();

            // Invoke the doGetCachedPage method and get the cached bytes
            System.Byte[] bytes = s.doGetCachedPage(keyBox.Text, cacheBox.Text);
            // Display the length of the cached page
            cacheResultLabel.Text = Convert.ToString(bytes.Length);
        }