I would suggest creating a global variable at the top of your page and setting it to "false." At the bottom of the page (or at the bottom of the form) set the variable to true. Then, if the global variable's name is, for instance, frmIsLoaded, you could do:
if (frmIsLoaded)
{...