<h3 align="center"> City : <asp:DropDownList ID="ddlCity" runat="server"> </asp:DropDownList> </h3> <asp:LinqDataSource ContextTypeName="ExampleDataContext" TableName="Products" Where="Price>@UserPrice" ID="LinqDataSource1" runat="server"> </asp:LinqDataSource> <asp:GridView DataSourceID="LinqDataSource1" ID="GridView1" runat="server"> <Columns> <asp:BoundField DataField="city" HeaderText="City" SortExpression="city" ReadOnly="true" /> </Columns> </asp:GridView>
LinqDataSource1.Where = ddlCity.SelectedItem.value; LinqDataSource1.WhereParameters.Add("name1", "value1");
<asp:DropDownList ID="ddlCity" runat="server" autopostback="True"> </asp:DropDownList>
selectedindexchanged
where
LinkDatasource1
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)