私はGridviewを持っており、rowDataboundでその行をクリックして作成し、モーダルポップアップを表示しています。行がクリックされたときに、その行のIDが渡される必要があります。
protected void grdOrderProduct_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#ceedfc'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=''");
e.Row.Attributes.Add("style", "cursor:pointer;");
e.Row.Attributes["onClick"] = Page.ClientScript.GetPostBackClientHyperlink(btnPop, "12");
}
}
サーバーコントロールでこの「12」を取得するにはどうすればよいですか。私はデモ用に静的なものとして12を入れました。しかし、それは変わるでしょう。