protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        e.Row.Attributes.Add(
"onmouseover""c=this.style.backgroundColor;this.style.backgroundColor='#95B8FF'");
        e.Row.Attributes.Add(
"onmouseout""this.style.backgroundColor=c");
        e.Row.Attributes[
"style"= "Cursor:hand";
        
int count = GridView1.Rows.Count;
        
string ID = "";
        
for (int i = 0; i < count; i++)
        {
            ID 
= GridView1.DataKeys[i].Value.ToString();
            GridView1.Rows[i].Attributes.Add(
"onclick""newwin=window.open('default3.aspx?ID=" + ID + "','newwin','width=500,height=550')");
        }
    }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-12
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
  • 2021-06-05
相关资源
相似解决方案