mainrotor
asked on
I need help setting focus to an @Html.TextBoxFor in my MVC.Net application
ASKER
Lokesh,
Should I put the Script at the top of my view or towards the bottom?
Should I put the Script at the top of my view or towards the bottom?
Hi,
you can add below.
make sure you referenced the jquery before executing this script.
you can add below.
make sure you referenced the jquery before executing this script.
ASKER
How do you reference jQuery?
I only have a refence to bootstap on the top of my view:
I am using Visual Studio 2015. Don't know if that makes a difference on how to reference jQuery.
I only have a refence to bootstap on the top of my view:
<link href="~/Content/bootstrap.css" rel="stylesheet" />
I am using Visual Studio 2015. Don't know if that makes a difference on how to reference jQuery.
Hi,
jQuery will be referenced in _layout.cshtml
jQuery will be referenced in _layout.cshtml
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Okay. I will try it.
ASKER
That worked!!!!
Thank you.
Thank you.
You can set the focus using the jQuery as follows.
Open in new window