In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces ASP.NET Gridview in how to use checkbox delete, the text is very detailed, has a certain reference value, interested friends must read!
Method 1:
Background Code:
protected void btn_delete_Click(object sender, EventArgs e)
{
for (int i = 0; i 0)
{
ClientScript.RegisterStartupScript(GetType(),"Prompt","alert ('Delete succeeded! ')");
}
else
{
ClientScript.RegisterStartupScript(GetType(), Prompt, alert ('Delete failed! ')");
}
this.DataBind();
}
}
}
}
}
}
Front Desk:
.Hidden
{
display:none;
}
Add a new column, this column binds the id field, and the visable attribute cannot be false, otherwise the value cannot be obtained.
checkbox Select all functions:
function change(sender) {
var table = document.getElementById("GridView1");
for (var i = 1; i < table.rows.length; i++) {
table.rows[i].cells[1].getElementsByTagName("input")[0].checked = sender.checked;
}
}
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.