asp:imagebutton没有调用onclick函数 [英] asp:imagebutton not getting call on onclick function
本文介绍了asp:imagebutton没有调用onclick函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Asp:imagebutton函数没有在服务器端调用。
< asp:ImageButton ID =imgalt =OnClick =Hellorunat =serverCommandArgument ='<%#Eval(ImageUrl)%>'src ='<%#Eval(ImageUrl )%>'/>
Hi,
Asp:imagebutton function not getting call on server side.
<asp:ImageButton ID="img" alt="" OnClick="Hello" runat="server" CommandArgument='<%# Eval("ImageUrl") %>' src='<%# Eval("ImageUrl") %>' />
Protected Sub Hello(ByVal sender As Object, ByVal e As ImageClickEventArgs)
ScriptManager.RegisterClientScriptBlock(Page, Me.GetType(), "Javascript", "alert('hello');", True)
showAndHIde.Visible = "true"
End Sub
on imageclick hello function not run。
谢谢
Shubham Gupta
on imageclick hello function not run.
Thanks
Shubham Gupta
推荐答案
一段时间后我遇到了类似的问题。我只是将ImageButton的 CausesValidation 属性设置为false,它运行正常。
希望它也能帮到你!
I had the similar issue some time back. I just set the ImageButton's CausesValidation property to false and it worked fine.
Hope it would help you too!
这篇关于asp:imagebutton没有调用onclick函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文