【问题标题】:DropDownList content appearing in engine search results出现在引擎搜索结果中的 DropDownList 内容
【发布时间】:2012-05-07 11:11:28
【问题描述】:

我正在管理一家在线商店,客户可以从DropDownList 中选择他们的国家/地区来计算订单的运费,但我发现搜索引擎的结果显示了此控件中的国家/地区列表。

有人知道任何公认的 SEO 做法可以避免这种情况发生吗?

添加代码

<asp:DropDownList ID="CbCountry" DataTextField="Country" AutoPostBack="true" DataValueField="IdCountry" runat="server"></asp:DropDownList>

DropDownList 是用这个函数从数据库中填充的:

CbCountry.Items.Clear()
CbCountry.DataSource = (New CountryManager).GetCountries(lang)
CbCountry.DataBind()

If CInt(0 & Country) > 0 Then
    CbCountry.SelectedValue = Country
End If

【问题讨论】:

  • 我说让它保持原样,而不是你的工作,因为搜索引擎显示和工作。如果您不向 SS 显示它,您可以选择在来自 SS 的请求时不填充它,或者您可以使用 ajax 调用动态地填充它。

标签: asp.net drop-down-menu seo


【解决方案1】:

您可以使用Request.Browser.Crawler 进行简单检查

IF Request.Browser.Crawler Then
  CbCountry.Visible = false
Else
  CbCountry.Items.Clear()
  CbCountry.DataSource = (New CountryManager).GetCountries(lang)
  CbCountry.DataBind()

  If CInt(0 & Country) > 0 Then
      CbCountry.SelectedValue = Country
  End If
End if

很简单,但我看不出这样做的原因。

【讨论】:

  • 这不是我的决定:店主想要这样……感谢您的回答!
猜你喜欢
  • 1970-01-01
  • 2014-09-29
  • 2014-01-29
  • 1970-01-01
  • 2012-10-25
  • 1970-01-01
  • 1970-01-01
  • 2016-05-18
  • 1970-01-01
相关资源
最近更新 更多