Hi Peter,
1. when I comment out all the lines of code in the events
Ya, good point. When I was testing/modifying your code sample I didn't pay attention to that code. Sorry. It's not actually required to run the sample and once the HttpProxy is configured, all the ObjectDataStore stuff would be totally ignored.
With this code sample, the ComboBox runs a query against the Store on the "keyup" event. Once the MinChars count has been reached, every "keyup" event triggers the ComboBox .doQuery function to be fired.
From that point the Store takes over. The Store is then making an HTTP request to the .Url specified in the HttpProxy.
You can inspect the query before it's sent to the Store by tapping into the <BeforeQuery> Listener (or AjaxEvent). The following sample demonstrates handling the BeforeQuery Listener and alerting the "query string". The query is then canceled by returning "false" from the Handler.
Example
<Listeners>
<BeforeQuery Handler="Ext.Msg.alert('Query', queryEvent.query);return false;" />
</Listeners>
Several params are passed to the .Url. If using FireBug (or Fiddler) you can watch the request being made to the HttpProxy/Url. Three params are sent in the POST request, "query", "limit", and "start".
query j // the string to query
limit 10 // the number of records to return
start 0 // the record count start number
In the Handler, those values are pulled out the Request object (context.Request["query"]). In your example, the "query" is ultimately passed to into the LINQ query.
I hope this helps explain what's going on internally.
I've revised your original code sample and stripped out any of the unnecessary bits.
Example
<%@ Page Language="C#" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>ComboBox with HttpProxy</title>
</head>
<body>
<p><a href="Default.aspx">Reload</a></p>
<form id="form1" runat="server">
<ext:ScriptManager ID="ScriptManager1" runat="server" />
<ext:Store
ID="Store1"
runat="server"
AutoLoad="false"
RemoteSort="true">
<Proxy>
<ext:HttpProxy Method="POST" Url="Handler1.ashx" />
</Proxy>
<Reader>
<ext:JsonReader TotalProperty="totalCount" Root="records" ReaderID="Id">
<Fields>
<ext:RecordField Name="Id" />
<ext:RecordField Name="Name" />
<ext:RecordField Name="Email" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
<ext:ComboBox
ID="ComboBox1"
runat="server"
StoreID="Store1"
DisplayField="Name"
ValueField="Id"
TypeAhead="false"
LoadingText="Searching..."
Width="350"
PageSize="10"
ItemSelector="div.search-item"
MinChars="1">
<%--<Listeners>
<BeforeQuery Handler="Ext.Msg.alert('Query', queryEvent.query);return false;" />
</Listeners>--%>
<Template ID="Template1" runat="server">
<tpl for=".">
<div class="search-item">
<h3>{Name}</h3>
{Email}
</tpl>
</Template>
</ext:ComboBox>
</form>
</body>
</html>