引入服务地址后
try
   {
    GoogleServer.GoogleSearchResult r = s.doGoogleSearch("lIpbg1NQFHJxa59bxq5SqMuiN6hHs0Ef",TextBox1.Text,0,10,false,"",false,"","","");
    int count = r.estimatedTotalResultsCount;
    Label2.Text = "搜索关键字名为“" + TextBox1.Text + "”的总记录数为" + count.ToString() + "条!";
    ArrayList al = new ArrayList();
    string temp = "";
    for( int i = 0; i< r.resultElements.Length; i++ )
    {
     temp = "<a href=\"" + r.resultElements[i].URL + "\">" + r.resultElements[i].title + "</a>";
     al.Add(temp);
    }
    this.DataGrid1.DataSource = al;
    this.DataGrid1.DataBind();
   }
   catch(Exception ex)
   {
    Label2.Text = "错误:" + ex.Message.ToString();
   }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2021-11-05
  • 2021-05-10
  • 2021-11-07
  • 2021-12-10
猜你喜欢
  • 2021-08-03
  • 2021-07-07
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-13
相关资源
相似解决方案