Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > AutoComplete extender

Reply
Thread Tools

AutoComplete extender

 
 
=?Utf-8?B?Ym9iYnk=?=
Guest
Posts: n/a
 
      09-13-2007
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,
 
Reply With Quote
 
 
 
 
densial
Guest
Posts: n/a
 
      09-13-2007
On Sep 14, 10:48 am, bobby <bo...@discussions.microsoft.com> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AJAX Autocomplete Extender problem Stefan Filip ASP .Net 2 08-28-2012 03:15 PM
Autocomplete Extender: Issue with hyphen symbol on the textbox Rey ASP .Net 2 06-19-2008 04:51 AM
Autocomplete Extender Juan Romero ASP .Net 3 10-03-2007 09:30 PM
AutoComplete Extender Selection Event? GMartin ASP .Net 0 11-20-2006 10:02 PM
Enable autocomplete although site set autocomplete to off Frank Dohrmann Firefox 1 03-31-2006 11:28 PM



Advertisments