本文介绍了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...
推荐答案
<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中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!