Sorry if this is a simple answer, but I can't seem to find this (on SO or Google.)
I have an aspx page, with a GridView and each record has a button.
What I need to do is execute a bit of Javascript on each record that requests a bit of data from the underlying page class. The method on the class is static, so I'm not interested in the instance.
Also, I want to call this method WITHOUT doing a postback. Can this be done and, if so, how do I do this?
NOTE
I know that everyone always wants the code but, essentially, I'm looking for a snippet that I can put within an OnClientClick
event. Something like this:
<asp:Button id="myButton"
runat="server"
...
OnClientClick='PageClass.UserMustConfirm()?confirm("Are you sure you want to continue?") : true ' />