All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
PHP爱好者来看:常用PHP代码_php资料_编程技术
Windows下Apache+Tomcat+MySQL+jsp+php的服务器整合配置经验总结_php资料_编程技术
SQL,server,2005中的DATENAME函数_[SQL,Server教程]
Visual,Studio,2008,简体中文版下载_[Asp.Net教程]
SQL循序渐进(23)UNION,和,外部连接_[SQL,Server教程]
SQL循序渐进(8)删除记录_[SQL,Server教程]
ASP.NET效率陷阱之——Attributes_[Asp.Net教程]
关于textarea的直观换行_JavaScript技术_编程技术
SQL,Server,2005新特性_[SQL,Server教程]
C#教程:COM+的概念
Reading number is top 10 pictures
漂亮的跳舞妹妹2
The real super beauty3
yy365网站上的美女2
Angie Chiu vijara myth1
Most cow mistress ZhaoGongXia face exposure
再发一张清纯美眉的照片
Ashlynn Brooke show proud chest measurement1
BingBingFan apple dew point photo gallery3
可爱的狗熊们
关于海盗的研究
Download software ranking
Popkart Cracked versions Mobile phone games
Boxer's Top ten classic battle9
Boxer's Top ten classic battle10
Eclipse-CALMSANNY (second edition)
The hero
Sora aoi‘s film--Lust fan wall
终极变速大师Speeder3.26
美女写真3
Proficient in Eclipse
美女写真1
归海一刀 published in(发表于) 2014/1/30 1:28:18 Edit(编辑)
GridView实现全选及删除源代码_[Asp.Net教程]

GridView实现全选及删除源代码_[Asp.Net教程]

GridView实现全选及删除源代码_[Asp.Net教程]
前台代码


后台代码
protected void Button1_Click(object sender, EventArgs e) { if (Button1.Text == "全部选中") { foreach (GridViewRow row in GridView1.Rows) { CheckBox CheckBox2 = (CheckBox)row.Cells[0].FindControl("CheckBox2"); CheckBox2.Checked = true; } Button1.Text = "全部不选"; } else { foreach (GridViewRow row in GridView1.Rows) { CheckBox CheckBox2 = (CheckBox)row.Cells[0].FindControl("CheckBox2"); CheckBox2.Checked = false; } Button1.Text = "全部选中"; } } protected void Button2_Click(object sender, EventArgs e) { foreach (GridViewRow row in GridView1.Rows) { CheckBox CheckBox2 = (CheckBox)row.Cells[0].FindControl("CheckBox2"); if (CheckBox2.Checked == true) { SqlConnection conn = Fun.InitConn(); SqlCommand comm = new SqlCommand(); comm.Connection = conn; comm.CommandText = "delete from Comment where Comment_ID=’" + row.Cells[2].Text + "’ "; conn.Open(); comm.ExecuteNonQuery(); conn.Close(); } } }


添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.