先遍历每一行,判断checkBox是否选中,再获取选中行的主键Id 删除就行了 ,,,
foreach(DatalistRow rowview in Datalist.Rows) //遍历Datalist中的每一行
{
//假设你的Datalist中的复选框放在第一列,id是“CheckBox1”
CheckBox check = (CheckBox)rowview.Cells[0].FindControl("CheckBox1");//找到了checkbox控件
if(check.Checked)//如果被选中
{
...
//假设你把每一行的id放在第二列
string myid = rowview.Cells[1].text;//这就是所在行的id,赋值给了myid
....//作删除操作
}
}
Wow, amazing weblog layout! How long have you been running a
blog for? you make blogging look easy. The entire look of your
site is magnificent, let alone the content material!
You can see similar here ecommerce
Just wish to say your article is as astounding.
The clarity in your post is simply spectacular and i can assume you’re an expert on this
subject. Well with your permission allow me to grab your feed to keep updated with forthcoming post.
Thanks a million and please carry on the rewarding work.
I saw similar here: Sklep online
Howdy! Do you know if they make any plugins to assist with Search
Engine Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good results.
If you know of any please share. Thank you! You can read similar text here:
E-commerce