Howdy,
I'm witnessing some extremely odd behavior with an AutoCompleteExtender in a small web application I'm building. In the past, I've used this extender with no problems; however, now it appears the extender is actually calculating values before sending them to the client. I have a asp:wizard, and on step N of the wizard I have a few textbox controls. One textbox is used for entering a lot number, and the lot number may contain a -, +, /, etc.
When I tested the application out I was receiving some extremely odd values from the AutoCompleteExtender (obviously not real lot numbers). I couldn't quite figure it out. Obviously the stored procedure and web service was executing properly becuase I was able to obtain data, but the data itself was incorrect. As a sanity check I did a query on the database (the LOT column in Table X) and several of the values being displayed by the AutoCompleteExtender were not in the database. I [directly] ran the web service built for the AutoCompleteExtender to consume, and the data returned was correct. So somewhere between the web service and the client the data was being altered.
Quite the conundrum... I placed a brake point in my web service to take a look, the code for the web service is below:
1 [WebMethod]
2 [ScriptMethod]
3 public string[] AutoCompleteLotNumber(string prefixText, int count)
4 {
5 List<string> items = new List<string>();
6
7 IDBManager dbManager = new DBManager(DataProvider.SqlServer);
8
9 dbManager.ConnectionString = ConfigurationSettings.AppSettings["ConnectionString"].ToString();
10
11 dbManager.Open();
12 dbManager.CreateParameters(2);
13 dbManager.AddParameters(0, "@LOTNUMBER", prefixText);
14 dbManager.AddParameters(1, "@ROWCOUNT", count);
15 dbManager.ExecuteReader(CommandType.StoredProcedure, "acLotNumber");
16
17 while (dbManager.DataReader.Read())
18 items.Add(dbManager.DataReader["LOTNUMBER"].ToString());
19
20 dbManager.Dispose();
21
22 return items.ToArray();
23 }
A quick watch on the items array on line 22 revealed the following:

This is the expected data. Note the slash "/" for items 8 and 9 in the array. Now, hold on to your boots, when the AutoCompleteExtender actually loads at the client I receive the following:

Notice how, items 8 and 9 have changed (incorrect per the web service / sp / database). It didn't take me too long to realize that the slash "/" is actually being interpreted as division and is being calculated before it is rendered at the client. Any ideas on how to go about fixing this issue? Seems like this would be classified as a bug in my opinion unless I've done something horribly wrong here. I've found that this same phenomena also occurs for any fields containing a -, *, or even mod. I've racked my brain and can not figure out how to resolve this issue.
Any help, anyone can provide, would be most appreciated.
-Jeremy