Click here to Skip to main content
13,257,667 members (77,752 online)
Rate this:
Please Sign up or sign in to vote.
See more:
<td align="center">
                    No. of days
                        <asp:TextBox ID="txtNoDaysCandt" Columns="3" runat="server" CssClass="tabletext"   AutoPostBack="True" Text="5" MaxLength="3" OnDataBinding="SetContextKey()" ></asp:TextBox>

<asp:TextBox ID="TextBox2" runat="server" OnDataBinding ="SetContextKey()"></asp:TextBox>
<cc1:AutoCompleteExtender ServiceMethod="GetCompletionList"
MinimumPrefixLength="2"    CompletionInterval="100" EnableCaching="false" CompletionSetCount="10"
TargetControlID="TextBox2" UseContextKey = "true" ID="AutoCompleteExtender1"
runat="server" FirstRowSelected = "false" onclientitemover="SetSelectedValue">

and vb code is...
<System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()> _
   Public Shared Function GetCompletionList1(ByVal prefixText As String, ByVal count As Integer, ByVal contextKey As String) As List(Of String)
       Dim n As String = contextKey
       Dim userid As String = HttpContext.Current.Session("LogIn_user")
       Dim constr As String = System.Web.Configuration.WebConfigurationManager.ConnectionStrings("DBConnectionString").ConnectionString
       Dim con As New SqlConnection(constr)
       Dim cmd As New SqlCommand("select first_name,last_name from Candidate where first_name like'%" & prefixText & "%'and recruiter_FK in (select row_id from dbo.appuser WHERE user_id='" + userid + "')", con)
       Dim rd As SqlDataReader = cmd.ExecuteReader()
       Dim list As New List(Of String)()
       While rd.Read()
       End While
       Return list
   End Function

how can i get the value of no.of days textbox through contex key in auto complete extender or any other option to get value of it..
Posted 29-Oct-12 19:41pm
Sanjeev9918 30-Oct-12 0:43am
and the set context key() method is..
function SetContextKey() {


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.171114.1 | Last Updated 30 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100