Google Groups Home
Help | Sign in
Auto complete extender is working but....
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
patis.park@gmail.com  
View profile
 More options Sep 30, 3:13 am
From: "patis.p...@gmail.com" <patis.p...@gmail.com>
Date: Tue, 30 Sep 2008 00:13:13 -0700 (PDT)
Local: Tues, Sep 30 2008 3:13 am
Subject: Auto complete extender is working but....
Hello to all Professionals,

I have create a text box autofill using .asmx file its worling fine
here the code
But after this when i insert , separator this will repeat all the
previous values that is already filled in textbox please guide me or
send me how to do this

<form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"
EnablePageMethods="true">
            <Services>
                <asp:ServiceReference Path="~/autocomplete.asmx" />
            </Services>
        </asp:ScriptManager>
        <asp:TextBox ID="TextBox1" runat="server" Width="266px"></
asp:TextBox><div>
            <cc1:AutoCompleteExtender ID="AutoCompleteExtender1"
runat="server"
            TargetControlID="TextBox1"
            MinimumPrefixLength="1"
            ScriptPath="~/autocomplete.asmx"
            ServiceMethod="ListUser" ServicePath="">
            </cc1:AutoCompleteExtender>
        </div>
    </form>
//---------------------
[WebMethod]
    public string[] ListUser(string prefixText)
    {
     //return all records whose Title starts with the prefix input
string

        //int count = 10;
        string sql = "select BhootName from bhoot where bhootname like
@prefixText";
        SqlDataAdapter da = new SqlDataAdapter(sql, "Data
Source=vivacity5\\SQLEXPRESS;Initial Catalog=practice;Integrated
Security=True");
        da.SelectCommand.Parameters.Add("@prefixText",
SqlDbType.VarChar, 50).Value = prefixText + "%";
        DataTable dt = new DataTable();
        da.Fill(dt);
        string[] items = new string[dt.Rows.Count];
        int i = 0;
        foreach (DataRow dr in dt.Rows)
        {
            items.SetValue(dr["BhootName"].ToString(), i);
            i++;
        }
        return items;
    }

Regards,
Anil


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Narayanan Rm  
View profile
 More options Sep 30, 6:56 am
From: "Narayanan Rm" <catchn...@gmail.com>
Date: Tue, 30 Sep 2008 16:26:58 +0530
Local: Tues, Sep 30 2008 6:56 am
Subject: Re: [ajaxpro] Auto complete extender is working but....
Anil

Check out this URL

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoC...

On 9/30/08, patis.p...@gmail.com <patis.p...@gmail.com> wrote:

--
"The true test of character is not how much we know how to do, but how
we behave when we don't know what to do."

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Patis Anoo  
View profile
 More options Sep 30, 8:15 am
From: "Patis Anoo" <patis.p...@gmail.com>
Date: Tue, 30 Sep 2008 17:45:18 +0530
Local: Tues, Sep 30 2008 8:15 am
Subject: Re: [ajaxpro] Re: Auto complete extender is working but....

I have done this but how to remove other values when i insert other keyword
after perfix ,.

--
@nil

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google