讲下思路,还是只能把表字段列出来,选择查询
1条回答 默认 最新
- threenewbee 2019-05-14 16:39关注
可以字符串拼接 bool isfirst = true; string sql = "select "; foreach (CheckBox ch in this.FindControls.OfType<CheckBox>()) { if (ch.Checked && isfirst) { sql += ch.Text; isfirst = false; } else { sql += ", " + ch.Text; } } sql = " from table where ..."; ...
解决 无用评论 打赏 举报