Dynamics Ax Enterprise portal


I have real edit field (usage) control in Enterprise portal page with next and previous buttons.while clicking the next button the next button should validate the value entered in the control with some condition .if it satisfies the condition it should throw a error and not allow us to next page.i have written the validation code on the table validate write method.for the new record if we enter the value in the usage control and click next button.it is not validating.again pressing the previous button and click the next button its validating and throwing the error properly.i checked wether usage value is getting properly or not .

For example : for a new record if we enter the usage value 5000 .in the table level validate write method its passing 0 instead of 5000.after clicking next and previous its working fine .i want to get the value entered in usage field for the frst time only .as i dont know ASP.net.could some help me how to do this .

Thanks ,