Is It possible To Use ASP.NET TextBox With Jquery UI Auto CompletE? I am Able to use html input control with this plugin. is there any sample exist? thanks
1 Answer
Yes, of course. asp:TextBox is rendered as an input just as you use it now.
See this article: TextBox AutoComplete with ASP.NET and jQuery UI
Here's a quick example:
<asp:TextBox ID="tbAuto" runat="server"></asp:TextBox>
<script type="text/javascript">
$("input[id$=tbAuto]").autocomplete({ /* .. */ });
</script>
I've modified this example so you can see how the selector will work with ClientIDMode left as the default AutoID, but if you set it to Static you can use a direct selector:
<asp:TextBox ID="tbAuto" runat="server" ClientIDMode="Static"></asp:TextBox>
<script type="text/javascript">
$("#tbAuto").autocomplete({ /* .. */ });
</script>
2 Comments
Shahin
How can i search in static datasource for example Generic List Or Dataset? Thanks.
Codesleuth
That's a separate question to the one you've asked here. Post it as a new question so you will get more relevant answers.