J
Jay
I have the following code in BookList.aspx:
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False"
DataSourceID="LibSysDataSource" AllowPaging="True">
<Columns>
<asp:BoundField DataField="AccessionNo"
HeaderText="Accession No" />
<asp:BoundField DataField="Title" HeaderText="Title"
SortExpression="Title" />
<asp:BoundField DataField="Author" HeaderText="Author"
SortExpression="Author1LN" />
</Columns>
</asp:GridView>
<asp:AccessDataSource ID="LibSysDataSource" runat="server"
DataFile="~/App_Data/Library System BE.mdb"
SelectCommand="SELECT * FROM [Books by Volume] WHERE ([Title]
LIKE '%' + @Title + '%')">
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" DefaultValue="%"
Name="Title" PropertyName="Text"
Type="String" />
</SelectParameters>
</asp:AccessDataSource>
</div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</form>
I can filter the gridview using the TextBox1 within this form. But I want to
pass the value from Search.aspx to BookList.aspx.
Anyone know how to do this?
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False"
DataSourceID="LibSysDataSource" AllowPaging="True">
<Columns>
<asp:BoundField DataField="AccessionNo"
HeaderText="Accession No" />
<asp:BoundField DataField="Title" HeaderText="Title"
SortExpression="Title" />
<asp:BoundField DataField="Author" HeaderText="Author"
SortExpression="Author1LN" />
</Columns>
</asp:GridView>
<asp:AccessDataSource ID="LibSysDataSource" runat="server"
DataFile="~/App_Data/Library System BE.mdb"
SelectCommand="SELECT * FROM [Books by Volume] WHERE ([Title]
LIKE '%' + @Title + '%')">
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" DefaultValue="%"
Name="Title" PropertyName="Text"
Type="String" />
</SelectParameters>
</asp:AccessDataSource>
</div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</form>
I can filter the gridview using the TextBox1 within this form. But I want to
pass the value from Search.aspx to BookList.aspx.
Anyone know how to do this?