simple: need help handling a gridview against parameters
-
<%@ Page Language="C#" %> <html> <body> <form id="form1" runat="server"> <div> firstname:<asp:TextBox ID="TextBox1" runat="server"/> <br /> lastname:<asp:TextBox ID="TextBox2" runat="server"/> <br /> <asp:Button ID="Button1" runat="server" Text="Submit" /> <br /><br /> <asp:GridView ID="GridView1" runat="server" DataSourceID="ObjectDataSource1" /> <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="returnByName" TypeName="myService.Service"> <SelectParameters> <asp:ControlParameter ControlID="TextBox1" Name="firstName" PropertyName="Text" Type="String" /> <asp:ControlParameter ControlID="TextBox2" Name="lastName" PropertyName="Text" Type="String" /> </SelectParameters> </asp:ObjectDataSource> <br /> </div> </form> </body> </html>
I want that when the user clicks the button the gridview should be filtered by the parameter values in textbox1 & 2.Shimi