If I am using AddUser, I type the right InsertUserName and submit. Then the ModelState.IsValid in the controller will be false, because I did not type the
UpdateUserName,
UpdateUserName is null, it is not needed in the AddUser operation but its validation still takes effect. How to solve this?
guogangj
Member
4 Points
7 Posts
Re: Help, how to avoid repeated code.
May 04, 2012 09:01 AM|LINK
Good but still some issues.
If I am using AddUser, I type the right InsertUserName and submit. Then the ModelState.IsValid in the controller will be false, because I did not type the UpdateUserName, UpdateUserName is null, it is not needed in the AddUser operation but its validation still takes effect. How to solve this?