c# Repeater中CommandArgument传多个参数
<ItemTemplate>
<div onmouseover="javascript:this.style.cursor='hand'" style="width:70px; line-height:20px;background-color:#CCCCCC;border:solid 1px #000000;"> <asp:LinkButton ID="LinkButton1" CommandName="del" CommandArgument='<%# Eval("Parent_Id")+","+Eval("Id") %>' runat="server">删除</asp:LinkButton></div>
</ItemTemplate>
protected void GVSecondType_RowCommand(object sender, GridViewCommandEventArgs e)
{
string cmdName = e.CommandName;
if (cmdName == "del")
{
string[] estr = e.CommandArgument.ToString().Split(',');
int Parent_Id = Convert.ToInt32(estr[0]);
int TypeId = Convert.ToInt32(estr[1]);
}
}
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/y_h_t/archive/2009/11/18/4827980.aspx