In my webpage, I have a button "SAVE DRAFT". The first time it is clicked the record must be inserted and the text of the button would be changed as "Update Draft". Then how manytimes the button is hit, it should just update the record. However if the user goes from that page and enters this page again it should go back to "save draft" and rec insertion. How can I do this?