Asp.net源码专业站
首页->新闻文章->Handson简单新闻系统后台源码>>NewsClassManage/ClassManage.aspx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:Handson简单新闻系统后台源码
当前文件:文件类型 HandsonNews/NewsClassManage/ClassManage.aspx.cs[1K,2009-6-12 11:43:42]打开代码结构图
普通视图
		            
1using System; 2using System.Data; 3using System.Configuration; 4using System.Collections; 5using System.Web; 6using System.Web.Security; 7using System.Web.UI; 8using System.Web.UI.WebControls; 9using System.Web.UI.WebControls.WebParts; 10using System.Web.UI.HtmlControls; 11using System.Data.SqlClient; 12 13public partial class NewsClassManage_ClassManage : System.Web.UI.Page 14{ 15 protected void Page_Load(object sender, EventArgs e) 16 { 17 18 } 19 protected void GrdClassManage_RowDataBound(object sender, GridViewRowEventArgs e) 20 { 21 // 为每一个数据行添加两个属性,实现当鼠标经过时高亮的效果 22 23 if (e.Row.RowType == DataControlRowType.DataRow) 24 { 25 //鼠标移到该行时所在行变颜色,移出时恢复原来颜色 26 27 e.Row.Attributes.Add("onMouseOver", "this.style.cursor='hand';this.originalcolor=this.style.backgroundColor;this.style.backgroundColor='Silver';"); 28 e.Row.Attributes.Add("onMouseOut", "this.style.backgroundColor=this.originalcolor;"); 29 } 30 if (e.Row.RowType == DataControlRowType.DataRow && e.Row.RowType != DataControlRowType.Header 31 && e.Row.RowType != DataControlRowType.Footer && e.Row.RowType != DataControlRowType.EmptyDataRow 32 && e.Row.RowState != DataControlRowState.Edit && e.Row.RowState != (DataControlRowState.Alternate | DataControlRowState.Edit)) 33 { 34 //onclick删除按钮事件时,弹出确认对话框,提示您是否要删除该记录 35 36 ((LinkButton)e.Row.Cells[6].Controls[0]).Attributes.Add("onclick", "return confirm('你确认要删除分类名称为[" + e.Row.Cells[1].Text + "] 的这条记录吗?');"); 37 38 } 39 //try 40 //{ 41 // int a = int.Parse(e.Row.Cells[4].Text); 42 //} 43 //catch (FormatException) 44 //{ 45 // Response.Write("<script>window.alert('请输入整数!')</script>"); 46 //} 47 } 48 49 50 } 51 52
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:Handson简单新闻系统后台源码
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146