MVC-How to put Tool Tip in the TextBox, DropDownBox, CheckBox using jQuery


We need to put plugin in the cshtml page

<link rel="stylesheet" href="" temp_href="" />

<script src="" temp_src=""></script>

<script src="" temp_src=""></script>


Also we need to add the scripts int eh Cshtml page.


        $(document).ready(function () {

            $("#txtname").tooltip({ track: true });

            $("#ddlcategory").tooltip({ track: true });



Step 3

  • @Html.TextBoxFor(model => model.Net_Amount, new { @title = "Please enter the total income.", @id = "txtname" })
  • @Html.DropDownListFor(modelitem => modelitem.CategoryId, new SelectList(ViewBag.Categories, "CategoryId", "CategoryName"), new { @title = "Please select the category for your budget.", @id = "ddlcategory" }

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now