gridview中的图像按钮在IE 10中不起作用 [英] Image button in gridview is not working in IE 10

查看:61
本文介绍了gridview中的图像按钮在IE 10中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,



我有一个带有图像按钮的网格视图但是当我点击这些按钮时它没有工作(没有响应)。



Gridview代码:



这个gridview在更新面板下。



Hello All,

I have a gridview with image buttons but when I click on these button it is not working (not responding).

Gridview Code:

This gridview is under updatepanel.

<asp:TemplateField ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
                                                                               <ItemTemplate>                                                                                  <asp:ImageButton ID="imgbtnUndo2" CommandName="Revert" runat="server" ToolTip="Undo"                                                                                                                                                       ImageUrl="~/Images/Undo.png" CommandArgument='<%# DataBinder.Eval(Container, "RowIndex") %>' />                                                                               </ItemTemplate>                                                                         </asp:TemplateField>







任何人都可以帮我这个。



提前谢谢...




Can any one help me on this.

Thanks in advance...

推荐答案

我认为你错过了OnCommand事件捕获,因为你有命令名和命令参数但没有事件。尝试这样的事情。

I think you're missing the OnCommand event capture because you have command name and command arguments but no event. Try something like this.
<asp:TemplateField ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">                                                                               <ItemTemplate> 
                                                                                 <asp:ImageButton ID="imgbtnUndo2" OnCommand="imgbtnUndo2_OnCommand" CommandName="Revert" runat="server" ToolTip="Undo"                                                                                                                                                       ImageUrl="~/Images/Undo.png" CommandArgument='<%# DataBinder.Eval(Container, "RowIndex") %>' />   
                                                                            
</ItemTemplate>                                                                       </asp:TemplateField>





您需要在代码隐藏中处理OnCommand事件,以便图像按钮执行任何操作,在这种情况下,处理程序应命名为imbtnUndo2_OnCommand。



PS:代码项目以某种方式删除了我所有的首都,但希望这能解决它。



You will need to handle the OnCommand event in codebehind for the image button to do anything, the handler should be named "imbtnUndo2_OnCommand" in this case.

PS: Code project removed all my capitals somehow, but hope this solves it.


这篇关于gridview中的图像按钮在IE 10中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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