Click here to Skip to main content
15,440,268 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I have this issue I go through lot of forums and follows lot of Ways to Implement it.

Through Nuget Package Manager I get Jquery UI Combined Add reference to My Project.

Scripts files Were added to the Script folder as well as css files in the Content folder.

I just drag & drop and put it on .cshtml file

Atfirst, Intellisense didn't show AutoComplete Property. But Now It Shows the AutoComplete Property. Still I get this Error on.

What I am thinking is by Mistakenly lot of Script files I added.
I have jquery.ui.js,jquery.ui.min.js, and already In Mvc project there's an Jquery 1.10.2.js,jquery 1.10.2.min.js

Now,I Show My Code here please go through it and let me know what went Wrong

Thanks in Advance.

What I have tried:

In .cshtml

@Model IEnumerable<modelclass.dhoniregistry>

<link href="~/Content/jquery-ui.min.css" rel="stylesheet" />
<link href="~/Content/jquery-ui.structure.min.css" rel="stylesheet" />
<link href="~/Content/jquery-ui.theme.min.css" rel="stylesheet" />
<script src="~/Scripts/external/jquery/jquery.js"></script>
<script src="~/Scripts/jquery-ui.min.js"></script>
<script src=""></script>

<script type="text/javascript">
$(function ()
$("#txtSearch").autocomplete({ source: '@Url.Action("ASDhoniName")' });


@using (@Html.BeginForm())
Dhoni Name
@Html.TextBox("SearchTerm", null, new { id = "txtSearch" })
<input type="submit" value="Search" />

In Controller

public JsonResult ASDhoniName(string term)
DhoniRegistryBusinessSer dhoniBisSer = new DhoniRegistryBusinessSer();

List<string> dhoniReg;

dhoniReg = dhoniBisSer.ListDhoniRegistry().Where(x => x.DhoniName.StartsWith(term))
.Select(y => y.DhoniName).ToList();

return Json(dhoniReg,JsonRequestBehavior.AllowGet);
Updated 16-May-16 22:43pm

1 solution

You have two references to jquery UI so try deleting this one

<script src=""></script>

Ensure you only have one reference to jQuery also.
Share this answer
Mohammed Asarudeen R 17-May-16 5:32am    
Yes,Bro I did it but that too not worked.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900