0

Hey Guys,
I am trying to call codebehind onclick event from my markup from Firefox works find in IE. I hv created an image button and onClientClick I m calling a javascript function after checking some fields it should call onClick event in code behind but unfortunately its not, Please help.

<asp:ImageButton ID="SubmitChanges" runat="server" ImageUrl="../images/btn_images/btn_large_submitchanges_ng.gif" OnClientClick="return DoEdits();" />

html
function DoEdits(){
//check fields
return true;
}
cde behind
Public Sub SubmitChanges_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles SubmitChanges.Click
' code to process.
End Sub
3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by agrothe
0

You need to verify your javascript code if it is working correctly?

I think you are not setting the return type for JS function DoEdits().

0

Thanks for reply Faisal,
But I have tried removing DOedits function. It never hits submit event, and do edit is a javascript function how can I set a return type?

Thx

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.