📄 listofbooks.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;
using MyBookShop.BLL;
using MyBookShop.Models;
using System.Text;
public partial class Books_ListOfBooks : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnModify_Click(object sender, EventArgs e)
{
string sb = String.Empty;
for (int i = 0; i < this.gvBooks.Rows.Count; i++)
{
CheckBox cb = (gvBooks.Rows[i].FindControl("chbSelect")) as CheckBox;
if (cb.Checked == true)
{
sb += (gvBooks.Rows[i].FindControl("lblId") as Label).Text + ",";
}
}
}
protected void grv_Books_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#6699ff'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -