Do You Help Users By Selecting A Default Field
12/12/2012 2:46 PM by
Help your users by setting the default field when your MVC WebSite loads.
By selecting a default field for your users when a page loads you can improve the usability of your web site by reducing the amount of steps needed to perform a task.
Here is a way to do this with MVC 3 and Razor:
1. Add a div with a class around the field you want to set focus on
@Html.EditorFor(model => model.FirstName)
@Html.ValidationMessageFor(model => model.FirstName)
2. Then use jQuery to select the class and set focus:
Do you feel this rule needs an update?