I\'m trying to create an asyncrhonous postback in ASP.NET using __doPostBack()
, but I have no idea how to do it. I want to use vanilla JavaScript.
Some
I'd just like to add something to this post for asp:button
. I've tried clientId and it doesn't seem to work for me:
__doPostBack('<%= btn.ClientID%>', '');
However, getting the UniqueId seems to post back to the server, like below:
__doPostBack('<%= btn.UniqueID%>', '');
This might help someone else in future, hence posting this.