if u have VS2005+AJAX installed
add the ref of AjaxControlToolkit
Drag n Drop 'AutoCompleteExtender' Control and set its properties.

finally associate this to ur TextBox.

Bixam.




On Fri, May 22, 2009 at 9:18 AM, isaac2004 <[email protected]> wrote:

>
> so i fixed it so the webservice returns an array, how do i set up the
> aspx page to grab the array and make the textbox "suggest" the items
>
> On May 22, 8:34 am, "P. Bixam" <[email protected]> wrote:
> > http://www.asp.net/ajax/documentation/live/
> >
> > On Fri, May 22, 2009 at 12:52 AM, isaac2004 <[email protected]>
> wrote:
> >
> > > i am trying to display an autosuggest textbox that grabs information
> > > from a database, there are there alot of examples out there but i
> > > would like to use a webservice that i have created. how would i go
> > > about doing it with this webservice
> >
> > > <%@ WebService Language="C#" Class="WebService" %>
> >
> > > using System;
> > > using System.Web;
> > > using System.Web.Services;
> > > using System.Web.Services.Protocols;
> > > using System.Data;
> >
> > > [WebService(Namespace = "http://tempuri.org/";)]
> > > [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
> > > public class WebService : System.Web.Services.WebService
> > > {
> > >    [WebMethod(Description = "Input a name and it will return
> > > players")]
> >
> > >    public DataSet SearchPlayer(string query)
> > >    {
> > >        //Initialize data access class used in MIS 324 (written in
> > > VB.NET)
> > >        string strSQL = "Select nameFirst, nameLast from FullMaster
> > > where (nameFirst LIKE '" + query + "%') or (nameLast like '" + query +
> > > "%')";
> > >        DataAccess objDataAccess = new DataAccess("BaseballDatabase");
> > >        DataTable dt = new DataTable();
> > >        dt = objDataAccess.FillDataTable(strSQL);
> >
> > >        //Note: web services can return DataSets but not DataTables.
> > >        DataSet ds = new DataSet("dsPlayer");
> > >        ds.Tables.Add(dt);
> > >        ds.AcceptChanges();
> > >        return ds;
> >
> > >    }
> >
> > > }
> >
> > > in my asmx page, i want to create an ajax textbox that displays info
> > > from that webservice, any help would be great
>

Reply via email to