From: Mr. Arnold on 29 Jun 2010 14:12 Jay wrote: > 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? You can also to this using a javascript function on the client-side event without having to go to the server-side code behind file. <script type="text/javascript"> <!-- window.location = "http://www.google.com/" //--> </script> The other line needed would be to find the ID of the Textbox to get the string using a GetElementByID. "BookList.aspx?somvalue=" + value
First
|
Prev
|
Pages: 1 2 Prev: label with address format Next: Saving database data collects from few pages |