Database Reference
In-Depth Information
Figure 7-4. The User Settings page
User Update Form
The user settings form is located in {PROJECTROOT}/Views/User/Index.cshtml and is similar in structure to the other
forms presented in the Sign Up and Login sections. One difference is that you have added the value property to the
input element as well as the variables for displaying the respective stored values. If none exist, the form fields will be
empty. (See Listing 7-22).
Listing 7-22. User Update Form MOVED
<form class="form-horizontal" id="userform">
<div class="form-group">
<label for="firstname" class="col-sm-2 control-label">First Name</label>
<div class="col-sm-10">
<input type="text" class="form-control input-sm" id="firstname" name="user.
firstname" value="@Html.DisplayFor(model => model.firstname)" />
</div>
</div>
<div class="form-group">
<label for="lastname" class="col-sm-2 control-label">Last Name</label>
<div class="col-sm-10">
<input type="text" class="form-control input-sm" id="lastname" name="user.
lastname" value="@Html.DisplayFor(model => model.lastname)" />
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" id="updateUser" class="btn btn-default">Update
User</button>
</div>
</div>
</form>
 
Search WWH ::




Custom Search