如何在模板字段中传递两个参数 [英] how to pass two parameter in template field

查看:84
本文介绍了如何在模板字段中传递两个参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在复选框字段中传递两个参数以返回值.

我用:

i want to pass two parameter for in the checkbox field for returning value.

i use :

<asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# subProgram((DataBinder.Eval(Container.DataItem, "bit_indicator") + ";"+Eval("id")))%>' />


背后的代码:


code behind:

protected Boolean subProgram(object str,string doc_id)
    {
     
    }


那么模板字段有什么问题..

它给了错误提示器...

plz helpppp

谢谢Brother....


so what is wrong in template field..

it gives errorr......

plz helpppp

Thanksssss Brother....

推荐答案

请像对待链接按钮一样使用CommandArgument.以下是对复选框执行相同操作的提示:将命令参数传递给复选框 [ ^ ]
Use CommandArgument as we do for linkbuttons. Here is a Tip to do the same for checkboxes: Passing command arguments to a checkbox[^]


这篇关于如何在模板字段中传递两个参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆