MC-
Googling "updatepanel" and "javascript" will come up with various solutions.
Here's one I've picked apart from various blogs and forum posts that works
for me.
Here's what you'll need:
1. A javascript function to call __doPostBack.
2. A <asp:HiddenField /> inside your UpdatePanel that you want to update.
This helps "tag" the panel to ensure you're updating the correct one.
3. The onKeyUp javascript event on your TextBox control. Note: This will
throw a fit because VS2005 and Orcas do not recognize this as a valid event
for a TextBox (anyone know why or if that will change?).
In the Header of the page (or posted via Page.Header in codebehind), your
JavaScript will look something like:
<script type="text/javascript">
function updatePanelPostback()
{
__doPostBack("<%=upHiddenPostback.ClientID%>","");
}
</script>
This JavaScript will do a postback based on the ClientId of a hidden field
we'll add here in a moment.
Your TextBox control, the one you want to use to generate the onKeyUp event,
will call that JavaScript function.
<asp:TextBox ID="TextBox1" runat="server" OnKeyUp="javascript:updatePanelPostback();"
/>
Finally, your update panel will have an additional HiddenField tag.
<asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true"
UpdateMode="Conditional">
<contenttemplate>
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
<asp:HiddenField runat="server" ID="upHiddenPostback" />
</contenttemplate>
</asp:UpdatePanel>
Also, you can pass the HiddenField.ClientID as a parameter to your JavaScript
call to make it more reusable.
You can also tie this to any JavaScript event, like onClick, to force a specified
update.
HTH.
-dl