C# ASPX文件中的引用与ASPX.CS文件中的引用不一样
我正在使用.NET的谷歌API 我将DLL文件引用添加到项目中,并使用Google.API.Search使用C# ASPX文件中的引用与ASPX.CS文件中的引用不一样,c#,asp.net,C#,Asp.net,我正在使用.NET的谷歌API 我将DLL文件引用添加到项目中,并使用Google.API.Search使用对其进行寻址Search.aspx.cs文件,它可以完全正常工作 using Google.API.Search; namespace ASP._8 { public partial class Search : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e
对其进行寻址
Search.aspx.cs
文件,它可以完全正常工作
using Google.API.Search;
namespace ASP._8
{
public partial class Search : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
public static IList<IWebResult> Search()
{
GwebSearchClient client = new GwebSearchClient(@"http://www.google.com/");
IList<IWebResult> results = client.Search("Google API for .NET", 32);
return results;
}
}
}
有什么想法吗?附加Search.aspx
<% using Google.API.Search;
foreach (IWebResult a in ASP._8.Search.Search()){ %>
尝试添加:
<%@import Namespace="Google.API.Search" %>
就在下面
<%@import Namespace="Google.API.Search" %>