AutoComplete extender

Discussion in 'ASP .Net' started by =?Utf-8?B?Ym9iYnk=?=, Sep 13, 2007.

  1. I’m trying to figure out how I can achieve the followings:


    While typing in a textbox, making a webservice call gets possible values
    from DB in Autocomplete textbox. I need to validate that the user selection
    is one of the value list in AutoComplete textbox. If not, I need to display
    a warning message. Does anyone know how I can do this? I can do this by
    customValidate controls. But how. Could you please give me code as
    wellThanks in advance,
    =?Utf-8?B?Ym9iYnk=?=, Sep 13, 2007
    #1
    1. Advertising

  2. =?Utf-8?B?Ym9iYnk=?=

    densial Guest

    On Sep 14, 10:48 am, bobby <> wrote:
    > I'm trying to figure out how I can achieve the followings:
    >
    > While typing in a textbox, making a webservice call gets possible values
    > from DB in Autocomplete textbox. I need to validate that the user selection
    > is one of the value list in AutoComplete textbox. If not, I need to display
    > a warning message. Does anyone know how I can do this? I can do this by
    > customValidate controls. But how. Could you please give me code as
    > wellThanks in advance,


    in the aspx

    <asp:Label ID="lblRegion" runat="server"
    AssociatedControlID="txtRegion" Text="region:" style="color: White" />
    <conduit:TextBox ID="txtRegion" runat="server"
    AutoPostBack="true" Width="200" />
    <AjaxControlToolkit:AutoCompleteExtender ID="AutoRegion"
    runat="server"
    TargetControlID="txtRegion"
    ServicePath="~/services/AutoComplete.asmx"
    ServiceMethod="RegionSelectByCountryCode"
    CompletionSetCount="12"
    MinimumPrefixLength="1"
    ContextKey="0" />
    <asp:CustomValidator ID="valRegion" runat="server"
    Text="please enter a valid region" />
    <br />


    in the .vb
    (pseudocode because I use custom data component)

    make storedprocedure("RegionSelectByRegion")
    add parameter txtRegion.Text
    try
    dim oreader as reader = storedprocedure.executereader
    valRegion.IsValid = oreader.read

    Catch ex As Exception
    End Try

    hope this helps
    densial, Sep 13, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. GMartin
    Replies:
    0
    Views:
    381
    GMartin
    Nov 20, 2006
  2. Juan Romero

    Autocomplete Extender

    Juan Romero, Oct 3, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    713
    Lloyd Sheen
    Oct 3, 2007
  3. Stefan Filip

    AJAX Autocomplete Extender problem

    Stefan Filip, Nov 21, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    5,215
    yuriy.loginov
    Aug 28, 2012
  4. Rey
    Replies:
    2
    Views:
    3,451
    warrenvt
    Jun 19, 2008
  5. JM_newsgroups
    Replies:
    0
    Views:
    671
    JM_newsgroups
    Jun 12, 2008
Loading...

Share This Page