Google Groups Home
Help | Sign in
Message from discussion Auto complete extender is working but....
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
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
patis.park@gmail.com  
View profile
 More options Sep 30 2008, 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 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.

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