You can see some examples of batch data deletion on the Internet. however, most of them use arrays to save the selected id. this is troublesome and difficult to understand. I will use a simple method to implement this function. (just look at the red part, and add a delete prompt window)
Using System;
Using System. Collections;
Using System. ComponentModel;
Using System. Data;
Using System. Drawing;
Using System. Web;
Using System. Web. SessionState;
Using System. Web. UI;
Using System. Web. UI. WebControls;
Using System. Web. UI. HtmlControls;
Using System. Data. OleDb;
Namespace overred. test
{
/// <Summary>
/// Summary of t1.
/// </Summary>
Public class t1: System. Web. UI. Page
{
Protected System. Web. UI. WebControls. Label message;
Protected System. Web. UI. WebControls. LinkButton showck;
Protected System. Web. UI. WebControls. CheckBox CheckBox1;
Protected System. Web. UI. WebControls. LinkButton delall;
Protected System. Web. UI. WebControls. DataGrid dg;
Private OleDbCommand cmd;
Private OleDbConnection conn;
Protected System. Web. UI. WebControls. LinkButton lb;
Private string datas;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service