📄 logmanage.aspx.cs
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class back_LogManage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
// 为每一个数据行添加两个属性,实现当鼠标经过时高亮的效果
if (e.Row.RowType == DataControlRowType.DataRow)
{
//鼠标移到该行时所在行变颜色,移出时恢复原来颜色
e.Row.Attributes.Add("onMouseOver", "this.style.cursor='hand';this.originalcolor=this.style.backgroundColor;this.style.backgroundColor='Silver';");
e.Row.Attributes.Add("onMouseOut", "this.style.backgroundColor=this.originalcolor;");
}
//Onclick删除按钮事件,弹出提示对话框,提示是否想要删除该记录
ImageButton lbtn = (ImageButton)e.Row.FindControl("ImageButton1");
lbtn.Attributes.Add("onclick", "javascript:return confirm('您确定要删除吗?')");
}
if (e.Row.DataItemIndex == -1)
{
return;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -