Setting the DisplayTarget property to the value "Client" will hide the button if used from Enterprise Portal. If you not plan to use the list page in EP then go ahead.
Otherwise you will have to put your code in the target form init
or class main
method.