I am trying to use a RadTextBox with an ajax-AutoCompleteExtender. However the list does not return. If I use an asp textbox it works fine. Can someone tell me why I am unable to use a RadTextBox ? ior Am I missing something ?
Here is the code :
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Label ID="lblRepName" runat="server" Text="Agent:" CssClass="LblName"
Width="110px"></asp:Label>
<telerik:RadTextBox ID="txtRepName" runat="server" AutoPostBack="True" ontextchanged="txtRepName_TextChanged">
</telerik:RadTextBox>
<ajaxToolkit:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtRepName"
ServicePath="~/WebServices/ESFS_Autocomplete.asmx" ServiceMethod="GetNames" MinimumPrefixLength="2"
CompletionSetCount="15">
</ajaxToolkit:AutoCompleteExtender>
here is what i have for the event handler:
protected void txtRepName_TextChanged(object sender, EventArgs e)
{
//string test = txtRepName.Text.Replace(", ", "~");
// change name from last, first to last~first
string reverseName = "";
string fullName = txtRepName.Text;
//string fullName = ddlRepName.SelectedValue;
// txtRepName is Last, First name this will split at the ,
// and reverse to be First~Last name
string[] splName = fullName.Split(',');
if (splName.Length > 0)
{
string Name = splName[1] + "~" + splName[0];
reverseName = Name.Trim();
}
else
{
Response.Write("Error with Name: " + reverseName);
}
// look up login by First~Last name
//EmployeeSearchBy is a method where you can look up by Name, Login, CSG login
//email, Icoms login, ESSID, SalesID and Phone login
//ActiveDirectoryBase ad = new ActiveDirectoryBase(reverseName, EmployeeSearchBy.Name);
SAIDEmployee sdUser = new SAIDEmployee("EmployeeConnectString", reverseName, EmployeeSearchBy.Name);
_login = sdUser.DomainLogin;
getUserInfo();
}
Here is the code :
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Label ID="lblRepName" runat="server" Text="Agent:" CssClass="LblName"
Width="110px"></asp:Label>
<telerik:RadTextBox ID="txtRepName" runat="server" AutoPostBack="True" ontextchanged="txtRepName_TextChanged">
</telerik:RadTextBox>
<ajaxToolkit:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtRepName"
ServicePath="~/WebServices/ESFS_Autocomplete.asmx" ServiceMethod="GetNames" MinimumPrefixLength="2"
CompletionSetCount="15">
</ajaxToolkit:AutoCompleteExtender>
here is what i have for the event handler:
protected void txtRepName_TextChanged(object sender, EventArgs e)
{
//string test = txtRepName.Text.Replace(", ", "~");
// change name from last, first to last~first
string reverseName = "";
string fullName = txtRepName.Text;
//string fullName = ddlRepName.SelectedValue;
// txtRepName is Last, First name this will split at the ,
// and reverse to be First~Last name
string[] splName = fullName.Split(',');
if (splName.Length > 0)
{
string Name = splName[1] + "~" + splName[0];
reverseName = Name.Trim();
}
else
{
Response.Write("Error with Name: " + reverseName);
}
// look up login by First~Last name
//EmployeeSearchBy is a method where you can look up by Name, Login, CSG login
//email, Icoms login, ESSID, SalesID and Phone login
//ActiveDirectoryBase ad = new ActiveDirectoryBase(reverseName, EmployeeSearchBy.Name);
SAIDEmployee sdUser = new SAIDEmployee("EmployeeConnectString", reverseName, EmployeeSearchBy.Name);
_login = sdUser.DomainLogin;
getUserInfo();
}