Skip to main content

See what's going on, see the images at  http:\\\\www.mmsis.com.br\\mf\\Acesso1.png and http:\\\\www.mmsis.com.br\\mf\\Acesso2.png

      method-id Button1_Click protected.

      procedure division using by value sender as object e as type System.EventArgs.

          declare mymsg = "This is a message!"

          invoke self::ClientScript::RegisterStartupScript(type of self, "yourMessage", "alert('" & mymsg & "');", true)

      end method.

See what's going on, see the images at  http:\\\\www.mmsis.com.br\\mf\\Acesso1.png and http:\\\\www.mmsis.com.br\\mf\\Acesso2.png

      method-id Button1_Click protected.

      procedure division using by value sender as object e as type System.EventArgs.

          declare mymsg = "This is a message!"

          invoke self::ClientScript::RegisterStartupScript(type of self, "yourMessage", "alert('" & mymsg & "');", true)

      end method.

I am not sure what you are asking for here.

If you want to ensure that the fields are filled prior to the user clicking the button then you should disable the button until the fields have data in them.

Is that what you are asking for?


See what's going on, see the images at  http:\\\\www.mmsis.com.br\\mf\\Acesso1.png and http:\\\\www.mmsis.com.br\\mf\\Acesso2.png

      method-id Button1_Click protected.

      procedure division using by value sender as object e as type System.EventArgs.

          declare mymsg = "This is a message!"

          invoke self::ClientScript::RegisterStartupScript(type of self, "yourMessage", "alert('" & mymsg & "');", true)

      end method.

What I need is to know why the page is missing the setting when the message shows


See what's going on, see the images at  http:\\\\www.mmsis.com.br\\mf\\Acesso1.png and http:\\\\www.mmsis.com.br\\mf\\Acesso2.png

      method-id Button1_Click protected.

      procedure division using by value sender as object e as type System.EventArgs.

          declare mymsg = "This is a message!"

          invoke self::ClientScript::RegisterStartupScript(type of self, "yourMessage", "alert('" & mymsg & "');", true)

      end method.

Oh I see. The message is displayed prior to the page being rendered. To change this so that the page will be rendered before the message is displayed try the following instead:

      method-id Button1_Click protected.

      procedure division using by value sender as object e as type System.EventArgs.

          declare mymsg = "This is a message!"

          invoke type System.Web.UI.ScriptManager::RegisterStartupScript(self, type of self, "yourMessage", "window.onload = function(){alert('" & mymsg & "');}", true)

      end method.


See what's going on, see the images at  http:\\\\www.mmsis.com.br\\mf\\Acesso1.png and http:\\\\www.mmsis.com.br\\mf\\Acesso2.png

      method-id Button1_Click protected.

      procedure division using by value sender as object e as type System.EventArgs.

          declare mymsg = "This is a message!"

          invoke self::ClientScript::RegisterStartupScript(type of self, "yourMessage", "alert('" & mymsg & "');", true)

      end method.

Again thank you