I want to call javascript function and click method on single asp button click event.
I was trying with following code.
<asp:LinkButton ID="lbtnSave" runat="server"
OnClientClick="myFunction();"OnClick="lbtnSave_Click">Save</asp:LinkButton>--%>
//javascript
function myFunction() {}
//code behind method
protected void lbtnSave_Click(object sender, EventArgs e) {}
Thanks in advance.
@Aparna, as you are using validation control than i believe those validation controls get triggered when button is clicked.
To overcome this issue there are two alternates either define
validationgroupto your validation control or set theCausesValidation = falseof your link button.Example
Hope this will help !!