Some times we need code to executed under button click on some paricular condition or in some method after specific condition this can be done as follows