AJAX :: AutoCompleteExtender Both Working And Not Working?
Sep 9, 2010
[Code]....
In the upper code... AutCompleteExtender1 works perfectly... AutoCompleteExtender2 not working at all. Same web service, same method... both are inside the same .aspx file... both have exactly the same conditions.What is it that I am missing? And if you think that it is because they both calling the same service and method it is not... the second doesn't work with different service or different method (both inside the same service and in the different .asmx file).Can it be, that you simply can't have 2 ACE controls on the same page?And btw, is it possible to run server code once someone selects something from ACE control?
I am using AjaxAutoCompleteExtender in my asp.net program (C#) . I am applying the extender to a texbox and using internal Web Service. I am getting the desired result, when i am running from the development environment. After Publishing the site to IIS, I am not getting the list and not showing any errors. I have turned off custom errors. My website is not an Ajax Enabled WebSite. So i added the lines into my Web.Config.I tried all service path.. http://localhost/Test/ WebService.asmxhttp://192.109.1.8/Test/WebService.asmxand i tried ~/Test/WebService.aspxWhile testing from the development environment, i am using the last one.I am not sure whether this is the problem with the service path or any permission issue.
I tested the web service.it is working fine.The problem that i want to solve is to make call to webservice. Here is the .aspx code
<asp:TextBox ID="txtFullName" runat="server"></asp:TextBox> <ajaxToolkit:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtFullName" ServiceMethod="FindFullName" ServicePath="../WebService.asmx" EnableCaching="true"></ajaxToolkit:AutoCompleteExtender> Webservice code : using System; using System.Web; using System.Collections; using System.Web.Services; using System.Web.Services.Protocols; using System.Configuration; using System.Data.SqlClient; using System.Data; using System.Collections; using System.Collections.Generic; /// <summary> /// Summary description for WebService /// </summary> [WebService(Namespace = "[URL]/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.Web.Script.Services.ScriptService] public class WebService : System.Web.Services.WebService { public WebService () { //Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod] public string HelloWorld() { return "Hello World"; } [WebMethod] public string[] FindFullName(string prefixText) { string sql = "Select FName from Investigators Where FName like @prefixText"; SqlDataAdapter da = new SqlDataAdapter(sql,"Data Source=vvvvv;Initial Catalog=vyyyd;Persist Security Info=True;User ID=PowetttrUsyyer;Password=888888); da.SelectCommand.Parameters.Add("@prefixText", SqlDbType.VarChar, 50).Value = prefixText+ "%"; DataTable dt = new DataTable(); da.Fill(dt); List<string> liste = new List<string>(); foreach (DataRow dr in dt.Rows) { liste.Add(dr.ItemArray[0].ToString()); } return liste.ToArray(); } }
I have a textbox with the autocompleteextender in VS2010 that is referencing a webservice. However, nothing I seem to do makes this work as no values are returned when I begin typing in the textbox. When I view the webservice in my browser and invoke it, it returns values so I know that my webservice works. Code below.
I got the auto complete extender working with the database, but will show the autocomplete only if the data is less than around 500 records.... anything above that, and the exntender will not show at all.... Does the auto complete extnder have a limit on the number of records?.
i have an asp.net application in which i have used autocomplete extender now when i deploy it on the server (2003 and iis 6) the autocomplete extender does not work .. i looked on the net and found out the system.web.extensions system.web.extensions.design dll are needed for it, it was not present so i added them to the gac still it is not working i have .net3.5 sp1 instaled on the server.
I tried your code for Autocomplete without Webservice and didn't work on my page. When I tried it on a new project it works fine but on my project it does not. I have other controls on the page but that shouldn't stop it from working right?
Autocompleteextender not working inside an user control tried all ways. i have a custom function.. inside the cs file itself like the following :-
[Code]....
I did something like this and it worked properly when it was in aspx but when i changed all this to ascx and when i added the user control in aspx the autocomplete is not working. say enablecontext = false; i have even tried that.. its not even reaching till that function. moreover i need contextkey to validate different autocomplete controls inside my page.
I have one web application which is accessible via to different IP addresses (one of them is virtual) now the application is running smoothly when accessed via the original ip address but when the same application(website) is accessed via the virtual ip address the autocomplete extender is not working it is flashing a javascript error 'Stop running the script? A script on this page is causing internet explorer to run slowly
I have added autocompleteextender in page . It was working without parameters , when i have added parameters "pretext","count" it stops working. below are my code :
<div> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> <Services> <asp:ServiceReference Path="~/Admin/WebService1.asmx" /> </Services> </asp:ToolkitScriptManager> <asp:TextBox ID="TextboxCompletelist" runat="server"></asp:TextBox> <asp:AutoCompleteExtender ID="TextboxCompletelist_AutoCompleteExtender" runat="server" ServiceMethod="GetCompletionList" Enabled="True" ServicePath="~/Admin/WebService1.asmx" TargetControlID="TextboxCompletelist" CompletionSetCount="10"> </asp:AutoCompleteExtender> </div> namespace AgentService [WebService(Namespace = [URL] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ToolboxItem(false)] [System.Web.Script.Services.ScriptService] public class WebService1 : System.Web.Services.WebService { [WebMethod] public static string[] GetCompletionList(string PrefixText, int count) { string countryname; SqlParameter[] parm = new SqlParameter[1]; parm[0] = new SqlParameter("@PrefixText", PrefixText); DataTable dt = SqlHelper.ExecuteDataset(AppSetting.ActivateConnection, CommandType.StoredProcedure, "FetchAutoCompleteStates",parm).Tables[0]; List<string> items = new List<string>(); for (int i = 0; i <= dt.Rows.Count-1; i++) { countryname = dt.Rows[i]["statename"].ToString(); items.Add(countryname); } return items.ToArray(); }
i have tried autocompleteextender using page method and without master page and its working. but now im try to put them into master and its not working. this is my code***********pagename.ascx
following is the code i am using and it is not working.
<asp:TextBox ID="txtWarrantNumber" runat="server"></asp:TextBox> <AjaxCtrl:AutoCompleteExtender ID="acWarrantNumber" runat="server" TargetControlID="txtWarrantNumber" ServiceMethod="GetWarrantNumber" ShowOnlyCurrentWordInCompletionListItem="true" CompletionInterval="100" EnableCaching="true" MinimumPrefixLength="1" CompletionSetCount="4"> </AjaxCtrl:AutoCompleteExtender> </ContentTemplate> </asp:UpdatePanel> </PopupTemplate> Public Shared Function GetWarrantNumber(ByVal prefixText As String, ByVal count As Integer) As String() Dim warrantNumbers() As String = {"ankit", "sachin", "ankrrr", "ankppp"} Return warrantNumbers End Function
I have a web service file in my project having a web method which is used for AutoCompleteExtender and which works fine when I debug it from VS. But when I publish and host it on IIS, it's not working properly. However, I tested the webservice method directly by typing the URL and it gave the desired output. Is their a special setting needs to be done in IIS to make it working or any property of AutoCompleteExtender need to be set?
The web service works - the code is copied practically verbatim from the AJAX Control Toolkit samples. This is really frustrating me. I have looked at other questions on here and not found a solution yet.
I don't get any errors or exceptions. Typing in the text box doesn't do anything, the web service doesn't hit the break point.
I have ajax autocompleteextender and it is working fine with our test enviornment where we dont have secured HTTP. But while moving the code to Qa, which runs on HTTPS, AutoCompleteExtender stops working. I debugged and see control is going to webservice but unable to fetch data or call database from webservice.
After the implementation of ajax drag and drop, we have observed that which is working fine in IE and Firefox and not in chrome and safari, In Google chrome and Safari when we try to drag a module, the page getting scrolling to the top of the page.
I have a problem with partial postback in FireFox in my index.aspx I have following code:
[Code]....
Finally my Partialview has following content:
[Code]....
This code is working fine when using IE or Google Chrome, but when using FireFox the code in my controller is never reached. I just can't figure out what I am missing
I created a one Java script calender. Its working fine in ie6 but its not working in firefox. I'm new to this java script so kindly give your suggestion as soon as possible.
i m facing a issue in my code i m calling a user control which is in master page, and in row databound i m calling it and it is working fine but on select index change of checkbox it is not working
I have a web app with a table of statistics on our salesmen's customers, and each row has a sparkline graph showing the general trend of the sales data for the last 12 months. Each page shows a particular salesman's customer list, and some of them can have an enormous number of customers = an enormous number of rows = an enormous number of sparklines (e.g. one in particular has 125 and takes 15 seconds to load).
For this reason, jQuery sparklines could not be used - they completely pinned the CPU of a user accessing a page with a lot of sparklines with IE.
So I moved on to using the Google Chart API, which worked much better, except for two issues: 1) it's on a secure site, and the Google Chart API URL is only served over HTTP (solved by using a small wrapper script to download the graph dynamically and re-serve it from our secure server); and 2) on a page with 125 sparklines, it was still very slow due to the number of requests (even when the 0-9 server prefixes are used to maximize the # of available connections).
So my next step beyond this was to try to make each of the "download/grab/re-serve image" method calls asynchronous - and it worked!
...but only on my dev box running in debug mode.
When I pushed it up to the live site, it was faster, but it left some of the images unloaded, which is of course unacceptable.
So here is what I was hoping some SO hotshot would know:
1) Why are my asynchronous method calls working while debugging, but not working on the live site?
2) Is there any easier way to get a large number of sparklines of some sort to load quickly on a secure server without making me want to tear my hair out?
2a.) Does anyone have any experience using the ASP.NET Chart Library? Is this something I should investigate?
2b.) A co-worker suggested I make my own sparkline routine using a 1x1 CSS background image and varying the height. The problems are a) it is completely un-extensible in case we want to make changes; b) it seems hacky as hell (leaves about a bajillion DIVs per sparkline in the markup); and c) I have no idea if it will be fast enough when there are 100-200 of them on one page - what are your thoughts on the feasibility of the 1x1 sprite approach?
I mean, what is the faster way to get as fast as I can more than one table with stored procedure? Is there any study what is faster and why? There is a big problem getting more than one table at once with Entities, so the only way is DataSet. But I was told DataSet work very slow. Is that true?