0

I am using Jquery UI Multiple Values Autocomplete and I'm making the request to Server:

.autocomplete({
          source: function(request, response) {
              $.getJSON("handlers/autocomplete.ashx", {
                  term: extractLast(request.term)
              }, response);
          },

How to I get back the value of term in my .ashx handler?

I have tried Request.Form["TextBox1"] but I'm getting object reference not set to an intance of an object error. Is there any way I can get it directly?

Thanks

1 Answer 1

2

pass TextBox1 value with the url

.autocomplete({
          source: function(request, response) {
              $.getJSON("handlers/autocomplete.ashx?TextBox1=curtxt", {
                  term: extractLast(request.term)
              }, response);
          },

Read TextBox1 from Handlers public void ProcessRequest(HttpContext context) {

        HttpRequest request = context.Request;
        HttpResponse response = context.Response;

string txtval = request["TextBox1"];

   }
Sign up to request clarification or add additional context in comments.

Comments

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.