请问我该怎么办? string sql = "select * from [Table] where ID"+Convert.Int32(DropDownList.SelectValue)............GridView1.DataSource=ds;GridView1.DataBind(); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 没听明白, 可能你是想说 dropdownlist 中选择一个部门,gridview 中就出现这个部门的所有员工, 是这个意思吗? DropDownList1的autoPostBack设置为true,双击它的事件写bind定 把DropDownList的autoPostBack设置为true,再写个根据DropDownList所选中的值查寻数据库里的方法。代码如下:string str = DropDownList.SelectItem.Values.ToString();string sql = "select * from tableName where 数据库里的字段名的值='"+ str +"'";最后再让你的GridView重新调用DataBind()这个方法就可以了。^_^ LinkButton 控件问题求帮忙?? 我想冻结窗体,不知道该如何弄? select控件 二级联动问题 求SQL语句或存储过程 关于window.open()的小问题 集合已修改;可能无法执行枚举操作怎么解决啊 各位高手注意了 sql存储过程没看懂 请高手帮帮忙吧 请问如何使网页中的播放器逐个播放文件啊? 用visual c#.net 如何开发一个新闻系统?都是在visual C#.net里设计网页和编写代码吗? 00 两个gridview问题求解,如何用后台编程方式来实现? 大家觉得是时候用新建一个AJAX Control Toolkit工程来构建整个网站了吗?
代码如下:
string str = DropDownList.SelectItem.Values.ToString();
string sql = "select * from tableName where 数据库里的字段名的值='"+ str +"'";
最后再让你的GridView重新调用DataBind()这个方法就可以了。
^_^