Skip to main content

I need to give a message in a aspx application, for example when the user clicks on a button displaying the message.

I need to give a message in a aspx application, for example when the user clicks on a button displaying the message.

You can do this by using inserting the javascript "alert" command into the page using something like the following:

      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 need to give a message in a aspx application, for example when the user clicks on a button displaying the message.

Thank you, it worked perfectly!