0
I want to make a textbox
show me the names of registered users in the bank while I type. Ex: if I type the letter r, the textbox
should show me some options that contain the letter r, but, I’m not getting it to work. Did I forget something?
Here’s the code I’m using:
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/cupertino/jquery-ui.css" type="text/css" rel="Stylesheet" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#txtPesq").autocomplete({
source: '@Url.Action("pesquisarUsuario")',
minLength: 0
});
});
</script>
<h2>Index</h2>
@using (@Html.BeginForm())
{
@Html.TextBox("pesquisa", null, new { id = "txtPesq" })
<input type="submit" value="Pesquisar" />
}
I’m using Asp.net mvc and I don’t have any form to auto-fill. I just want my textbox to display the names as I type
– Ryan Santos
I already answered this one: http://answall.com/questions/31799/combo-box-research/31805#31805.
– Leonel Sanches da Silva