GridView控件CommandArgument 绑定多个参数
2011-04-08 10:53
357 查看
前台
<asp:LinkButton ID="lkBtnUpWard" runat="server" OnClick="lkBtnUpWard_Click" CommandArgument='<%# Eval("ValueId") +"&"+ Eval("V_ShowOrder") %>' >上移</asp:LinkButton>
后台
/// <summary>
/// 上移
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lkBtnUpWard_Click(object sender, EventArgs e)
{
LinkButton BtnUpWard = (LinkButton)sender;//强转
string temp=BtnUpWard.CommandArgument.ToString();
string[] estr = temp.Split('&');
string valueId = estr[0];
string showOrder=estr[1];
}
<asp:LinkButton ID="lkBtnUpWard" runat="server" OnClick="lkBtnUpWard_Click" CommandArgument='<%# Eval("ValueId") +"&"+ Eval("V_ShowOrder") %>' >上移</asp:LinkButton>
后台
/// <summary>
/// 上移
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lkBtnUpWard_Click(object sender, EventArgs e)
{
LinkButton BtnUpWard = (LinkButton)sender;//强转
string temp=BtnUpWard.CommandArgument.ToString();
string[] estr = temp.Split('&');
string valueId = estr[0];
string showOrder=estr[1];
}
相关文章推荐
- GridView控件CommandArgument 绑定多个参数
- GridView之实用第一招:CommandArgument 绑定多个参数
- GridView CommandArgument 绑定多个参数
- 在Gridview的模板里,控件的CommandArgument向后台传递多个参数
- 给GridView模版列中的按钮的CommandArgument属性绑定值及调用 [转]
- CommandArgument 绑定参数
- CommandArgument 绑定参数
- GridView使用DataKeyNames的例子 & CommandArgument传递多个参数 & 获取GridView编辑状态下单元格里的值
- GridView中CommandArgument如何传多个参数
- CommandArgument 绑定多个参数
- CommandArgument 绑定多个参数
- .NET数据控件 e.commandargument()绑定多个值
- 给GridView模版列中的按钮的CommandArgument属性绑定值及调用
- 给GridView模版列中的按钮的CommandArgument属性绑定值及调用
- CommandArgument 绑定多个 参数
- GridView使用DataKeyNames的例子 & CommandArgument传递多个参数 & 获取GridView编辑状态下单元格里的值
- aspx GridView 动态绑定 CommandArgument中使用后台方法
- GridView 动态添加模板列并绑定数据 实现从外部直接传入控件 和 绑定字段参数
- 【转】通过在RowDataBound事件中把行索引绑定到控件的CommandArgument,然后在RowCommand事件中取出
- CommandArgument属性 绑定参数