Home >> ASP.NET >> Implement Same WebMethod for AutoComplete in Multiple Textbox

Implement Same WebMethod for AutoComplete in Multiple Textbox

Hi,While Answering a question at Forum, I wrote this post.

Suppose We have Multiple Textbox in Same Page and we want to Implement AutoSuggest/AutoComplete feature in All Textbox and of same type. Suppose Multiple Google Search Boxes.

For that case, we have separate Textboxs, Separate AutoComplete Extenders and Separate Methods. We are trying to Consume same PageMethod in All Textbox.

Front End Code:

Product One:
DelimiterCharacters=”” Enabled=”True” ServiceMethod=”GetProducts” MinimumPrefixLength=”2″
ServicePath=”” TargetControlID=”TextBox1″ UseContextKey=”True”>
Product Two:
DelimiterCharacters=”” Enabled=”True” ServicePath=”” TargetControlID=”TextBox2″
ServiceMethod=”GetProducts” MinimumPrefixLength=”2″ UseContextKey=”True”>
Product Three:
DelimiterCharacters=”” Enabled=”True” ServicePath=”” TargetControlID=”TextBox3″
ServiceMethod=”GetProducts” MinimumPrefixLength=”2″ UseContextKey=”True”>
BackEnd Code:

Lets Look at the Output.

Hope this will be Helpful.
John Bhatt
Glad to Know, Free to Share…..

About John Bhatt

Aka, Prithvi Raj Bhatt, A Proud Nepali, Blogger, Software Developer, ASP.NET, Web Designer & Developer, Faculty and a Troubleshooter blog @PRsBlog

Check Also


How to enable Developer Tab in Microsoft Excel

Microsoft Excel is one of the most powerful application software that Microsoft made. We can …

Leave a Reply

Your email address will not be published. Required fields are marked *