难道datagrid的onitemcommand事件真的不能触发么? 你好多分呀。在另一个贴里已经回答了。onitemcommand事件是在任何按钮被单击时才发生。你上面全是绑定的。又没有按钮,肯定没有反应了。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不好意思看错了。你的代码没有错误。你这样试试:if ctype(e.commandsource,button).commandname="detail" then ....end if <asp:templatecolumn headertext="????"> <itemtemplate> <asp:button id="moreinf" text="????" commandname="detail" runat="server" /> </itemtemplate></asp:templatecolumn>错在上边了,不能用模板列,用按钮列。应该改成:<asp:buttonColumn CommandName="detail" Text="" HeaderText=""/> sql2005还原数据库问题!!急。 求助,服务器标记格式不正确,在线等 js 里的模态窗口 点击单选按钮时控制另外的控件的显示和隐藏 请教一个webpart(asp.net2.0)无刷新的问题 gridView 的几个问题,不知道是不是bug? vs 2005不能用IIS作为服务器调试web程序 关于用file上传图片的大小限制问题 (急)ASP编程中的错误代码解释,求人写出详细列表 就剩下20分了,都给了,我想用datagrid动态添加一行(并非数据绑定),但效果要和绑定后一样, 如何做到只打印panel里的内容?谢谢 亟待解决!!!100分!
你的代码没有错误。你这样试试:
if ctype(e.commandsource,button).commandname="detail" then
....
end if
<itemtemplate>
<asp:button id="moreinf" text="????" commandname="detail" runat="server" />
</itemtemplate>
</asp:templatecolumn>
错在上边了,不能用模板列,用按钮列。
应该改成:
<asp:buttonColumn CommandName="detail" Text="" HeaderText=""/>