CS代码如下:private string encode(string s) 
{
int length = s.Length;
String[]  encoder = new String[0x100];
StringBuilder buffer = new StringBuilder(length * 2); for (int i = 0; i < length; i++) 
{
char c = s[i];
int j = (int)c;
if (j < 0x100 && encoder[j] != null) 
{
buffer.Append(encoder[j]);   // have a named encoding
buffer.Append(';');

else if (j < 0x80) 
{
buffer.Append(c);   // use ASCII value

else 
{
buffer.Append("&#");   // use numeric encoding
buffer.Append((int)c);
buffer.Append(';');
}
}        return buffer.ToString();}
/// <summary>
/// Prepares the string with seach summary information.
/// </summary>
protected string Summary
{

get
{
if (total > 0)
return "<b>" + this.Query + "</b>的搜索结果:<b>" + this.fromItem + " - " + this.toItem + "</b> 总计:<b>" + this.total + "</b> 条.(搜索用时: " + this.duration.TotalSeconds + " 秒)";
return "<b>" + this.Query + "</b>没有找到.";
}
}/// <summary>
/// Return search query or null if not provided.
/// </summary>
protected string Query
{
get 
{
string query = this.Request.Params["q"];
if (query == String.Empty)
return null;
return ""+encode(query);
}
}
aspx文件:<asp:textbox id=TextBoxQuery runat="server" Width="312px" Text="<%# Query %>">
</asp:textbox>&nbsp;
<asp:button id="ButtonSearch" runat="server" Text="Search"></asp:button>
<P class="summary"><asp:label id=LabelSummary runat="server" Text="<%# Summary %>"></asp:label></P>
当打开页面查询时,同样获得Query。为什么会这样。textbox 显示:&#20135;&#21697;而label显示:产品没有找到.
请问:如何让textbox显示产品。ps:因为要从别的页面提交查询。所以进行要对查询参数进行重新编码,