LinkButton小用法:
1.在使用时可以通过CommandName和CommandArgument属性联合起来绑定并传值,如:
CommandName="record"
CommandArgument=‘<%#
Eval("MemberID")
%>‘
2.当有删除操作时会弹出确认对话框这是可这样写:
OnClientClick="javascript:if(confirm(‘确定删除吗?‘))
return true; else return
false;"
3.给属性绑定值
Visible=‘<%#
CheckState(Convert.ToInt32(Eval("FState")))%>‘
然后在后台写一个CheckState()方法.
或者写成Visible=‘<%#
Convert.ToInt32(Eval("FState"))==1?
true:false;%>‘
原文:http://www.cnblogs.com/JayK/p/3544001.html