<
asp:TemplateField
HeaderText
="操 作"
>
< ItemTemplate >
< asp:LinkButton ID ="LinkButton2" runat ="server" CausesValidation ="False"
CommandName ="zhixing" CommandArgument ='<%# Bind("id") % > '>执行 </ asp:LinkButton >
</ ItemTemplate >
</ asp:TemplateField >
< ItemTemplate >
< asp:LinkButton ID ="LinkButton2" runat ="server" CausesValidation ="False"
CommandName ="zhixing" CommandArgument ='<%# Bind("id") % > '>执行 </ asp:LinkButton >
</ ItemTemplate >
</ asp:TemplateField >
protected
void
GridView1_RowCommand(
object
sender, GridViewCommandEventArgs e)
{
if (e.CommandName == " M " )
{
//int id = Convert.ToInt32(e.CommandArgument); 取ID
}
if (e.CommandName = " Y " )
{
}
}
{
if (e.CommandName == " M " )
{
//int id = Convert.ToInt32(e.CommandArgument); 取ID
}
if (e.CommandName = " Y " )
{
}
}