阅读背景:

asp.net(C#)中实现多个DropDownList及多个TextBox的多条件查询

来源:互联网 

这里是通过语句拼接来实现多条件查询的


重要代码:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default19.aspx.cs" Inherits="Default19" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:DropDownList ID="DropDownList1" runat="server" Width="80px">
            <asp:ListItem Text="序号" Value="SerialNumber" />
            <asp:ListItem Text="客户代码" Value="CustomCode" />
            <asp:ListItem Text="客户PO" Value="CustomPO" />
            <asp:ListItem Text="是不是急单" Value="OrderGrade" />
            <asp:ListItem Text="申请人" Value="ApplicantName" />
        </asp:DropDownList>
        <asp:TextBox ID="tb_x1" runat="server" Width="140px">
        </asp:TextBox>
        <asp:DropDownList ID="DropDownList2" runat="server" Width="80px">
            <asp:ListItem Text="序号" Value="SerialNumber" />
            <asp:ListItem Text="客户代码" Value="CustomCode" />
            <asp:ListItem Text="客户PO" Value="CustomPO" />
            <asp:ListItem Text="是不是急单" Value="OrderGrade" />
            <asp:ListItem Text="申请人" Value="ApplicantName" />
        </asp:DropDownList>
        <asp:TextBox ID="tb_x2" runat="server" Width="140px">
        </asp:TextBox>
        <asp:DropDownList ID="DropDownList3" runat="server" Width="80px">
            <asp:ListItem Text="序号" Value="SerialNumber" />
            <asp:ListItem Text="客户代码" Value="CustomCode" />
            <asp:ListItem Text="客户PO" Value="CustomPO" />
            <asp:ListItem Text="是不是急单" Value="OrderGrade" />
            <asp:ListItem Text="申请人" Value="ApplicantName" />
        </asp:DropDownList>
        <asp:TextBox ID="tb_x3" runat="server" Width="140px">
        </asp:TextBox>
        <asp:Button ID="btn_search" runat="server" Text="检索" OnClick="btn_search_Click">
        </asp:Button>
    </div>
    </form>
</body>
</html><%@ Page Language="C




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: