Calling Codebehind javascript function while running a process

Asked

Viewed 80 times

1

The idea is I have a grid where in each row there is a button. The desired is that when the user presses the button the page is fixed (Freeze) and have the request validated. And when the server returns the result return the page to the initial state.

I already have the code to fix and to get back to normal with the page. My problem is that when I click on the button of one of the grid lines and call the method to fix the page and to process the request it first processes the request and then fixes the page. The code I’m using is as follows::

protected void gv_parks_ItemCommand(object sender,Telerik.Web.UI.GridCommandEventArgs e)
{ 
   if(e.CommandName == "Process"){
         ScriptManager.RegisterStartupScript(this, this.GetType(), "ntmtch", "skm_LockScreen('We are processing your request...');", true);

      int result = ProcessRequest(dados)

      if(result == 0)
      {
           ScriptManager.RegisterStartupScript(this, this.GetType(), "ntmtch1", "skm_UnLockScreen('Sucesso...');", true);
      }
      else
      {
          ScriptManager.RegisterStartupScript(this, this.GetType(), "ntmtch2", "skm_UnLockScreen('Erro...');", true);
      }
   }
}

Anyone know how to help me? Thank you

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.