2012-05-07 72 views
0

我在管理一个在线商店,客户可以从DropDownList中选择自己的国家来计算其订单的运费,但我发现搜索引擎的结果显示国家在这个控制。显示在引擎搜索结果中的DropDownList内容

任何人都知道任何接受的SEO实践,以避免这种情况发生?

CODE ADDED

<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 
+0

我们可以看到您的代码 – skhurams

+0

我说让它保持原状,而不是您的工作,搜索引擎显示和工作。如果你不想向SS显示它,你可以选择在SS发出请求时不填充它,或者你可以使用ajax调用动态生成它。 – Aristos

回答

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 

是一个简单的检查很简单,但我看不到这样做的原因。

+0

这不是我的决定:店主希望这样......并感谢您的回答! –