I have a public string in my code behind file that I intend to call from javascript when I'm ready for it. However, since it's not really tied to a particular event, it just fires every time the page loads. I would set it to only fire if(IsPostBack) but the control I'm using (for many other reasons) is an input type=button so the page never really does postback meaning the code will never fire.
How do I have something like:
public string dontExecuteYet()
{
Do some server side stuff
Then redirect on delay
return string
}
in my Code Behind such that it doesn't run until I tell it to?
to me this is ASP.Net Ajax + WebMethod.
see for exemple :