0

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 1

1

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>
Sign up to request clarification or add additional context in comments.

2 Comments

How can i search in static datasource for example Generic List Or Dataset? Thanks.
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.