Hi,
I want to integrate autofocus into my application when the user leaves the field blank
Below is my code,
<div class="form-group">
<label for="Username">Email or Username</label>
@Html.TextBoxFor(x => x.EmailID, new { @maxlength = 100, @class = "qa-form-tall-text", placeholder = "User Name" })
@Html.ValidationMessageFor(x => x.EmailID)
</div>
<div class="form-group">
<label for="Username">Password</label>
@Html.PasswordFor(x => x.Password, new { @maxlength = 200, @class = "qa-form-tall-text", placeholder = "Password" })
@Html.ValidationMessageFor(x => x.Password)<br />
</div>.
Please provide some appropriate solution to accomplish my task.
Hemant Patel
26-Dec-2017Hello,
Sophie you can use autofocus attribute in your code to achieve your task.
Please follow the below-modified line of code to achieve your task,
I hope it's informative for you...