Reputation: 5980
I have a button, I need to display a pop-up in javascript. So on its client click I call a javascript function which does that.
if user clicks "yes", I need to do a post back and call buttons server side click event, here is what I am doing inside the javascript function
__doPostBack(deleteLinkButton, 'Click');
' Where deleteLinkButton is a variable that has client Id of the button.
Postback happens but it does not go in the click handler for that button.
What can be wrong?
Upvotes: 2
Views: 6364
Reputation: 11
Can be done like this:
document.getElementById('<%= Button.ClientID %>').click();
Upvotes: 1
Reputation: 108050
Try it like this:
__doPostBack('deleteLinkButton', 'Click');
Upvotes: 1