<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>
答案 0 :(得分:0)
使用实体框架。将数据绑定到gridview并使用DropDownList的SelectedIndexChanged属性重定向到该页面。你可以使用这样的东西:
private DataEntities dataContext;
dataContext = new DataEntities1();
gv.DataSource = dataContext.objectName.ToList<TEntity>();
gv.DataBind();