Loading ...
Sorry, an error occurred while loading the content.

Re: Autocomplete with .net web service

Expand Messages
  • raul_p0pescu
    There s an example of autocomplete usage with HttpHandler at http://yuiasp.net/livedemo/AutoComplete/AutoComplete_RemoteData.aspx Nothing with WebServices yet,
    Message 1 of 5 , Jan 2, 2009
    • 0 Attachment
      There's an example of autocomplete usage with HttpHandler at
      http://yuiasp.net/livedemo/AutoComplete/AutoComplete_RemoteData.aspx

      Nothing with WebServices yet, but will be added in the future.

      --- In ydn-javascript@yahoogroups.com, "merav_tomer" <hanantomer@...>
      wrote:
      >
      > Hi,
      > Is there an example how to use .net web service in conjunction with
      > AutoComplete control ?
      >
    • Alexandros Vellis
      On Fri, 2 Jan 2009 09:05:16 +1100 ... This is entirely a server-based issue. And we don t even know what _language_ you use server-side! :-) If you use PHP
      Message 2 of 5 , Jan 3, 2009
      • 0 Attachment
        On Fri, 2 Jan 2009 09:05:16 +1100
        Mark Ireland <markincuba@...> wrote:

        >
        > Is there an example how to use LDAP in conjunction with
        >
        > AutoComplete control ?

        This is entirely a server-based issue. And we don't even know what
        _language_ you use server-side! :-)

        If you use PHP server-side, there are plenty of LDAP code examples to
        get you around. Just make sure that in the server side, after you do
        the search, you send over just what you need to the client-side. The
        basic remote data example should get you started:
        http://developer.yahoo.com/yui/examples/autocomplete/ac_basic_xhr.html

        HTH,

        --
        Alexandros Vellis
        National and Kapodistrian University of Athens
        Network Operations Centre
      • merav_tomer
        Thanks Raul. This was finally the direction which led to a solution. For the record, enclosed the handler code: public void ProcessRequest (HttpContext
        Message 3 of 5 , Jan 5, 2009
        • 0 Attachment
          Thanks Raul.
          This was finally the direction which led to a solution.
          For the record, enclosed the handler code:

          public void ProcessRequest (HttpContext context)
          {
          string query = context.Request.Params [ 1 ];
          string callback = context.Request.Params [ 2 ];

          DataContractJsonSerializer ser = new
          DataContractJsonSerializer( typeof( Suggestion[] ) );
          MemoryStream ms = new MemoryStream();

          Suggestion [ ] suggestionArr = QueryManager.LoadSuggestions(
          query );

          ser.WriteObject( ms , suggestionArr );

          string json = System.Text.Encoding.Default.GetString
          (ms.ToArray());

          string start =
          "{\"ResultSet\":{\"Result\":";

          string end = "}}";

          string res =
          string.Format( "{0}({1}{2}{3})" , callback , start,
          json.Trim(), end);

          context.Response.ContentType = "text/plain";

          context.Response.Write(res);
          }


          --- In ydn-javascript@yahoogroups.com, "raul_p0pescu"
          <raul.popescu@...> wrote:
          >
          > There's an example of autocomplete usage with HttpHandler at
          > http://yuiasp.net/livedemo/AutoComplete/AutoComplete_RemoteData.aspx
          >
          > Nothing with WebServices yet, but will be added in the future.
          >
          > --- In ydn-javascript@yahoogroups.com, "merav_tomer" <hanantomer@>
          > wrote:
          > >
          > > Hi,
          > > Is there an example how to use .net web service in conjunction
          with
          > > AutoComplete control ?
          > >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.