I am creating a two page razor registration process. The difficulty here is to collect data (username, password, etc.) on the first page and use hidden input variables to store data on the first page on the second.
here is my hidden code:
<div id="hidden vals" style="display:none;"> @Html.HiddenFor(model => model.userRegisterModel.UserName) @Html.HiddenFor(model => model.userRegisterModel.studentFirstName) @Html.HiddenFor(model => model.userRegisterModel.studentlastName) @Html.HiddenFor(model => model.userRegisterModel.Email) @Html.PasswordFor(model => model.userRegisterModel.Password) @Html.PasswordFor(model => model.userRegisterModel.ConfirmPassword) </div>
the problem is the password and password confirmation. I do not want to use a hidden password type field, but I want my password to be saved, but not displayed in the page source. but "PasswordFor" has a side issue that it "depopulates" the values and causes the user to re-populate.
So, to reinstall, I need my password and confirm that it is saved and preferably not displayed to the user. Urine is important, I need my password and confirm the values not hidden from the "view source"
My alternative strategy is to use a session variable to store all the values of "page 1", but this eliminates another disadvantage of id.
source share