I have read many different resources but am still not sure if this is possible without using AJAX.
I have a javascript function that loads a div into a modal and says "Loading Please Wait" I have named this funciton loadingModal()
function loadingModal(url)
{
     loadModal(...)
}
What I need to do is only trigger this after I have verified that the password and username are correct on the server side so:
btnSubmit_OnClick(object sender EventArgs e)
{
     string usr;
     string password;
     if (verify(usr, password))
     {
          ///// TRIGGER JAVASCRIPT HERE
          LOAD TONS OF SESSION VARIABLES
          .
          .
          .
      }
      else
         Show Error and Definitely Don't ever mention still loading
 }
I know I could just attach an onclientclick call to the javascript however it would load the loading modal even if it was an invalid username and password
Can I trigger javascript mid execution from the server side?