protected void GridView1_RowDataBound1(object sender, GridViewRowEventArgs e)
    {
if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes.Add("onclick", "javascript:" + this.ClientScript.GetPostBackEventReference(this, "12345"));

        }
    }


继承IPostBackEventHandler  

public partial class Page1 : System.Web.UI.Page,IPostBackEventHandler   

实现接口

 public void RaisePostBackEvent(string eventArgument)
    {
        if (eventArgument == "12345")
        {
            Response.Write("DFSFSF");
        }
    }
 
 

相关文章:

  • 2022-02-05
  • 2022-12-23
  • 2021-11-27
  • 2022-01-22
  • 2021-08-11
  • 2022-12-23
  • 2021-11-17
猜你喜欢
  • 2022-02-15
  • 2021-10-26
  • 2022-12-23
  • 2021-10-02
  • 2021-07-15
  • 2021-11-29
相关资源
相似解决方案