So far I'm not finding the same problem in other questions on this site. Here's what I'm experiencing:
I have an ASP.NET WebForms app with an UpdatePanel containing a search area where I have a ASP:TextBox that I use for a jQuery autocomplete.
$(document).ready(function() {
$("#tabContainer_tabSearchBreaks_txtSearchName").autocomplete("AutoCompleteEmployee.ashx", { minChars: 3, maxItemsToShow: 10 });
});
This whole thing works fine, but if I click on a ASP:Button and process some code for the search area, the autocomplete javascript no longer works.
Any ideas???
There's got to be a solution to reset the textbox to call the js code.
[Update - More Code] Here's what the update button does for the search area that is separate from the autocomplete code:
try
{
int employeeID;
string[] namelst = txtSearchName.Text.Split(new string[] { " " }, StringSplitOptions.None);
employeeID = int.Parse(namelst[2].Substring(1, namelst[2].Length - 2));
string name = namelst[0] + " " + namelst[1];
var breaks = bh.ListBreaksForEmployeeByDate(employeeID, DateTime.Parse(txtFromDate.Text), txtToDate.Text.Length > 0 ? DateTime.Parse(txtToDate.Text).AddDays(1).AddSeconds(-1) : DateTime.Today.AddDays(1).AddSeconds(-1));
if (breaks.Count() > 0)
{
lblEmployeeTitle.Text = "Breaks for " + name;
gridSearchBreaks.DataSource = breaks;
gridSearchBreaks.DataBind();
}
}
catch
{
}
Hope this helps. For the time being I've hidden the tab that contains this problem from the users.