页面:
<asp:Button ID="Button1" runat="server" Text="修改" OnClick="Button1_Click" CommandArgument='<%#Eval("ID")+","+MyHtml.NotHtml(Eval("Body").ToString(),0)+""%>'/>
以逗号间隔参数
代码:
protected void Button1_Click(object sender, EventArgs e)
{
Button lb = (Button)sender;
string[] arg = lb.CommandArgument.ToString().Split(','); ;
string id = arg[0];
string body =MyUnity.NoHTML(arg[1]);
}
转自:
http://blog.163.com/dandanno_1/blog/static/17496408420130290452825/