62,272
社区成员
发帖
与我相关
我的任务
分享
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
<asp:Button ID="Button2" runat="server" Text="Button" />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="LinqDataSource1">
<Columns>
<asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False" ReadOnly="True" SortExpression="Id" />
<asp:BoundField DataField="Type" HeaderText="Type" SortExpression="Type" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" />
<asp:BoundField DataField="Discount" HeaderText="Discount" SortExpression="Discount" />
<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
<asp:BoundField DataField="Hits" HeaderText="Hits" SortExpression="Hits" />
<asp:BoundField DataField="Sales" HeaderText="Sales" SortExpression="Sales" />
<asp:CheckBoxField DataField="Status" HeaderText="Status" SortExpression="Status" />
</Columns>
</asp:GridView>
<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="DataClassesFlowerDataContext" EnableDelete="True" EnableInsert="True" EnableUpdate="True" EntityTypeName="" TableName="Flower">
</asp:LinqDataSource>
<asp:QueryExtender ID="QueryExtender1" runat="server" TargetControlID="LinqDataSource1" >
<asp:SearchExpression DataFields="NAME" SearchType="StartsWith">
<asp:ControlParameter ControlID="TextBox1" />
</asp:SearchExpression>
<asp:RangeExpression DataField="Price" MaxType="Inclusive" MinType="Inclusive">
<asp:ControlParameter ControlID="TextBox2" />
<asp:ControlParameter ControlID="TextBox3" />
</asp:RangeExpression>
</asp:QueryExtender>
<asp:Button ID="Button3" runat="server" Text="Button" OnClick="Button3_Click" />
</div>
</form>
</body>