I have two textboxes (txtStartDate and txtEndDate). I would like to pull all data between those dates in a gridview. I can't seem to get the procedure to trigger.
Any ideas?
Code:
<%@ Page Language="vb" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Variable Weekly Data</title>
</head>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<table>
<tr>
<td align="right">
Start Date:
</td>
<td align="left">
<asp:TextBox ID="txtStartDate" Runat="server" />
</td>
<td align="center">
<a href="javascript:;" onclick="window.open('popup.aspx?textbox=txtStartDate','cal','width=250,height=225,left=270,top=180')">
<img src="images/SmallCalendar.gif" border="0"></a>
</td>
</tr>
<tr>
<td align="right">
End Date:
</td>
<td align="left">
<asp:TextBox ID="txtEndDate" Runat="server" />
</td>
<td align="center">
<a href="javascript:;" onclick="window.open('popup.aspx?textbox=txtEndDate','cal','width=250,height=225,left=270,top=180')">
<img src="images/SmallCalendar.gif" border="0"></a>
</td>
</tr>
</table>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="AccessDataSource1">
</asp:GridView>
<asp:AccessDataSource ID="AccessDataSource1" runat="server"
DataFile="~/OrderCount.mdb"
SelectCommand="SELECT * FROM [qry3McWkCountRevised] WHERE (([RecDate] >= ?) AND ([RecDate] <= ?))">
<SelectParameters>
<asp:QueryStringParameter Name="RecDate" QueryStringField="txtStartDate"
Type="DateTime" />
<asp:QueryStringParameter Name="RecDate2" QueryStringField="txtEndDate"
Type="DateTime" />
</SelectParameters>
</asp:AccessDataSource>
</form>
</body>
</html>
Any ideas?