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.