0
我有一個搜索按鈕和兩個文本框作爲日期時間選擇器。我能做些什麼來顯示特定日期間隔內的所有記錄?我是編程新手。如何在兩個日期之間顯示GridView中的記錄
<%@ Page Title="Report" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="Report.aspx.vb"
Inherits="Report" %>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
<asp:GridView ID="gvItems" runat="server" AutoGenerateColumns ="false">
<Columns>
<asp:BoundField HeaderText="Part Number" DataField="Part_Number" readonly="true" ></asp:BoundField>
<asp:BoundField HeaderText="Last Inventory" DataField="Last_Inv" readonly="true" ></asp:BoundField>
<asp:BoundField HeaderText="Last Quantity" DataField="Last_Qty" readonly="true" ></asp:BoundField>
<asp:BoundField HeaderText="Inventory Today" DataField="Today_Inv" readonly="true" ></asp:BoundField>
<asp:BoundField HeaderText="Today's Quantity" DataField="Today_Qty" readonly="true" ></asp:BoundField>
</Columns>
</asp:GridView>
<br />
<br />
<div class ="container" >
<div class="input-group class col-sm-3 col-md-6">
<asp:Button ID="btnSearch" runat="server" Text="Search" />
<asp:TextBox ID="txtbxSearch1" runat="server" TextMode ="Date" Width="205px"></asp:TextBox>
<asp:TextBox ID="txtbxSearch2" runat="server" TextMode ="Date" Width="205px"></asp:TextBox>
</div> <br /> <br />
</div>
<br />
<br />
那麼,過濾在'btnSearch.Click'的'GridView'的數據源 –