小编Ben*_*der的帖子

仅允许Google CSE并禁止在ROBOTS.txt中使用Google标准搜索

我有一个网站,我正在使用谷歌自定义搜索引擎.我希望Google CSE抓取我的网站,但我希望它不会出现常规Google搜索结果.我把它放在我的robots.txt文件中,希望google CSE机器人会忽略它,因为我指定了我希望Google CSE在设置中抓取的页面

User-agent: *
Disallow: /
Run Code Online (Sandbox Code Playgroud)

我猜Google CSE机器人也必须服从robots.txt.那么有没有办法让我的网页远离搜索引擎搜索,但谷歌CSE仍然可以索引它?TIA!

robots.txt google-custom-search

6
推荐指数
1
解决办法
713
查看次数

如何使用asp和c#下载多个文件

我对此很陌生,所以请耐心等待.这是我的代码.即使选择了多个文件,它也只下载一个文件.

foreach(String fileName in fileNameList)
{
    FileInfo updateFile = new FileInfo("C:/inetpub/wwwroot/w4/DanyaWebReports/Data/" + fileName);
    Response.ContentType = "application/octet-stream";
    Response.AddHeader("content-disposition", "attachment;filename=\"" + Path.GetFileName(updateFile.FullName) + "\"");
    Response.AddHeader("content-length", updateFile.Length.ToString());
    Response.TransmitFile(updateFile.FullName);
    Response.Flush();
}
Run Code Online (Sandbox Code Playgroud)

c# asp.net download

3
推荐指数
1
解决办法
2万
查看次数

标签 统计

asp.net ×1

c# ×1

download ×1

google-custom-search ×1

robots.txt ×1