C
Cathryn Johns
Hi
I have a server-side (asp.net) method that can be called by clicking a
<asp:button> on my webpage. This method should also be called every n
seconds, so I've set up a javascript timer which fires every n seconds.
The problem is that I then don't know how to call the server-side
method.
I figured that since I already have a button calling that method, I
could just emulate the button click, but I've tried two methods and
neither seem to work. document.AllocationsForm.LoadButton.click()
complains that document.AllocationsFrom.LoadButton is null or doesn't
exist, and __doPostBack('LoadButton', '') does a postback but doesn't
actually execute the method.
I have a server-side (asp.net) method that can be called by clicking a
<asp:button> on my webpage. This method should also be called every n
seconds, so I've set up a javascript timer which fires every n seconds.
The problem is that I then don't know how to call the server-side
method.
I figured that since I already have a button calling that method, I
could just emulate the button click, but I've tried two methods and
neither seem to work. document.AllocationsForm.LoadButton.click()
complains that document.AllocationsFrom.LoadButton is null or doesn't
exist, and __doPostBack('LoadButton', '') does a postback but doesn't
actually execute the method.