CommandName与CommandArgument
来源:互联网 发布:mac word文件丢失 编辑:程序博客网 时间:2024/04/30 14:18
当网页上具有多个Button控件时,多个Button控件又处理单个事件,可以标记按钮,使代码根据窗体上被单击的按钮进行逻辑判断,这样的Button按钮没有OnClick事件,用Button_Command事件代替。
命令的附加信息可以使用CommandArgument属性来指定,可以用CommandArgument来精确定义需要的参数值
<asp:LinkButton ID="lbtnDel" CommandName="del" CommandArgument='<%#Eval("userid") %>' runat="server">删除</asp:LinkButton></td>
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
{
if (e.CommandName.ToString() == "del")
{
new BLL.usersBLL().Deleteusers(int.Parse(e.CommandArgument.ToString()));
ShowData();
}
}
0 0
- CommandName与CommandArgument
- CommandName与CommandArgument
- CommandName与CommandArgument
- 学习 CommandName 和 CommandArgument
- CommandName属性和CommandArgument属性
- CommandName属性和CommandArgument属性
- CommandName 和 CommandArgument的区别
- CommandName属性和CommandArgument属性[转]
- button控件具体用法(CommandName, CommandArgument)
- Button控件的onclick、oncommand、commandname、CommandArgument的区别
- Button控件的onclick、oncommand、commandname、CommandArgument的区别
- Button控件的onclick、oncommand、commandname、CommandArgument的区别
- 控件整理之Button按纽组CommandName和CommandArgument
- linkbutton控件中使用CommandName属性和CommandArgument属性
- linkbutton控件中使用CommandName属性和CommandArgument属性
- CommandName
- commandname
- Button控件的onclick、oncommand、commandname、CommandArgument的区别_新起点(Net && C#)
- 3.1 创建线程执行器
- OpenCV_读取文件夹下的图片生成视频文件
- UML视图(五)活动图
- DELETE、TRUNCATE与高水位线(HWM)
- 《贺新郎.读史》 —— 毛泽东
- CommandName与CommandArgument
- POJ - 1475 Pushing Boxes
- storm problem
- JavaScript AOP编程 很明了的一个例子
- sublime text3 插件安装
- 数组非数字键名引号的必要性
- 常见软件设计模式的应用场合
- 应用层之域名系统----DNS
- How to get primary key column in Oracle?