How to retain the values of textboxes if validation is there

Are you trying the scaffold generator? We may need more information to
help you with this. Probably the best place to ask this kind of help
is to login into the irc freenode.