I am using Jquery Autocomplete in my MVC3 application and I have multiple textboxes that I want to set up smartly. I am trying to return the autocomplete field property to the controller like this:
<script type="text/javascript" >
$(document).ready(function () {
$(".AutoC[id]").autocomplete('@Url.Action("Liczba_wejsc", "Home")', { minChars: 1, selectFirst: true, extraParams: { "ID": $(this).attr('id')} });
});
</script>
<div class="editor-field">
@Html.ValidationMessageFor(m => m.some_prop)
<br/>@Html.TextBoxFor(m => m.some_prop, new {
id = "some_id", @class = "AutoC" })
</div>
However, I always end up receiving null as a result.