我有这样的代码
GridViewRowCollection row1 = GridView2.Rows;
foreach (GridViewRow row in GridView2.Rows)
{
LinkButton objlink = (LinkButton)row.FindControl("LinkButton2");
objlink.ForeColor = Color.Blue;
}
LinkButton objrow1 = (LinkButton)(e.CommandSource);
objrow1.BackColor = Color.BurlyWood;
在这里,当我单击命令源之一时,例如名称.. 它会更改该名称的背景颜色,但我还想在同名上再单击一次以禁用背景颜色..
我怎样才能做到这一点?
谢谢