Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Passing Textbox Value to ContextKey in AutoCompleteExtender

$
0
0

Hello,

I'm trying to use the contextKey in the AJAX AutoComplete tool but there is a problem with regards to passing the contextKey value to the method located in the web service file.

Let me describe how my web form is organised.

There are two textboxes. One of them has the AutoComplete tool. The user enters a word in Textbox1 (which does not have the AutoComplete tool). Afterwards, when he clicks in TextBox2 (which has the AutoComplete tool) and starts to type, the AutoComplete tool will show him the close matches. Now, the items in the AutoComplete menu are retrieved from a SQL database. The Select command (of the AutoComplete which is in the web service file) returns values based on the the value of TextBox1 in the main forum.

This is the client-code of AutoComplete 1:

<cc1:AutoCompleteExtender ID="AutoCompleteExtender1"
runat="server"
TargetControlID="TextBox2"
ServicePath="AutoCompleteField.asmx"
ServiceMethod="GetCompletionList"
MinimumPrefixLength="1"
CompletionInterval="1"
UseContextKey="true"
ContextKey=***WHAT SHOULD I WRITE HERE? SOMETHING LIKE TextBox1.Text***></cc1:AutoCompleteExtender>

Thanks in advance.

Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>