前文 这里。 ASPX页面代码如下: <tr> <td class="record" height="20">关 键 词: <asp:textbox id="txtQuery" accessKey="Q" runat="server" Width="250px" MaxLength="50"></asp:textbox> <asp:button id="btnSearch" runat="server" Text="搜索" EnableViewState="False"></asp:button></td></tr><tr> <td height="10">查询方式: <asp:dropdownlist id="cboQueryType" accessKey="T" runat="server" Width="250px" EnableViewState="False"> <asp:ListItem Value="All" Selected="True">包含全部的字词</asp:ListItem> <asp:ListItem Value="Any">包含任何一个字词</asp:ListItem> <asp:ListItem Value="Boolean">布尔表达式查询</asp:ListItem> <asp:ListItem Value="Exact">全字匹配</asp:ListItem> <asp:ListItem Value="Natural">自然语言查询</asp:ListItem> </asp:dropdownlist> </td></tr><tr> <td class="record" height="20">查询范围: <asp:dropdownlist id="cboDirectory" accessKey="D" runat="server" Width="250px" EnableViewState="False"> <asp:ListItem Value="/" Selected="True">整个网站</asp:ListItem> </asp:dropdownlist> </td></tr><tr> <td class="record" height="20"><asp:label id="lblResultCount" runat="server" Font-Italic="True" visible="False" EnableViewState="False"></asp:label></td></tr><tr> <td vAlign="top" height="210"> <asp:datagrid id="dgResultsGrid" runat="server" PageSize="15" AllowPaging="True" AutoGenerateColumns="False" Visible="False" GridLines="None" EnableViewState="False"> <ItemStyle HorizontalAlign="Left" VerticalAlign="Top"></ItemStyle> <HeaderStyle Font-Bold="True"></HeaderStyle> <Columns> <asp:TemplateColumn HeaderText="排名"> <HeaderStyle Width="40px"></HeaderStyle> <ItemTemplate>> 后台代码,使用VB.NET书写: ' 绑定查询结果End Sub End Property ' 如果网页没有Title,那么使用文件名End Function 界面外观如下图: 相关文章: