<asp:DropDownList ID="DropDownList1" runat="server" CssClass="account-content">
<option value="" onclick="tbl_city"> All</option>
<option value="">City</option>
<option value="">State</option>
<option value="">Country</option>
<option value="">Project</option>
<option value="">Project Detail</option>
<option value="">Project Category</option>
<option value="">User</option>
<option value="">User Detail</option>
</asp:DropDownList>
1 个解决方案
#1
0
Use Entity Framework. Bind data to the gridview and use SelectedIndexChanged property of DropDownList to Redirect to that page . you can use something like this:
使用实体框架。将数据绑定到gridview,并使用DropDownList的SelectedIndexChanged属性重定向到该页。你可以这样使用:
private DataEntities dataContext;
dataContext = new DataEntities1();
gv.DataSource = dataContext.objectName.ToList<TEntity>();
gv.DataBind();
#1
0
Use Entity Framework. Bind data to the gridview and use SelectedIndexChanged property of DropDownList to Redirect to that page . you can use something like this:
使用实体框架。将数据绑定到gridview,并使用DropDownList的SelectedIndexChanged属性重定向到该页。你可以这样使用:
private DataEntities dataContext;
dataContext = new DataEntities1();
gv.DataSource = dataContext.objectName.ToList<TEntity>();
gv.DataBind();