473,748 Members | 2,223 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<newbie> problem with updatepanel and trigger

hi

asp.net 3.5 (project upgraded from asp.net 2.0).
are using vwd2008 express now

This is my first ajax attempt. The code below shows a TextBox and a ListBox.
The idea I was trying to accomplish was that the items in the ListBox was
automatically filtered as the user type text into the textbox... But nothing
happens. The OnTextChanged event isn't even fired when I type in the
textbox.

Any suggestions?

<table style="width: 100%;">
<tr>
<td>
<asp:TextBox ID="txtTextBox1 " Width="190"
OnTextChanged=" OnTextChanged" runat="server"> </asp:TextBox>
<asp:ImageButto n ID="ImageButton 1" runat="server"
ImageUrl="~/Images/Go.gif" />
</td>
</tr>
<tr>
<td>
<asp:UpdatePane l ID="UpdatePanel 1" runat="server">
<ContentTemplat e>
<asp:ListBox Width="200" ID="ListBox1" runat="server">
</asp:ListBox>
</ContentTemplate >
<Triggers>
<asp:AsyncPostB ackTrigger ControlID="txtT extBox1"
EventName="Text Changed" />
</Triggers>
</asp:UpdatePanel >
</td>
</tr>
</table>
Nov 12 '08 #1
1 5347
OnTextChanged is a serverside event. it will only be fired on a
postback. you can put autopostback on a textbox to auto fire a postback,
but this will only happen when the client side onblur happens (focus
leaves textbox).

to reload the listbox as the users types will require you write client
script that is attached to the clientside onkeypress event. this code
should then do an ajax call to update the list. the update panel is
probably overkill for this, I'd just have the javascript do a webservice
call and reload the list in client script.

google combobox controls and you will get a lot of sample javascript.
the ajax control toolkit has similar control. this would probably be
covered in any javascript book.

-- bruce (sqlwork.com)
Jeff wrote:
hi

asp.net 3.5 (project upgraded from asp.net 2.0).
are using vwd2008 express now

This is my first ajax attempt. The code below shows a TextBox and a ListBox.
The idea I was trying to accomplish was that the items in the ListBox was
automatically filtered as the user type text into the textbox... But nothing
happens. The OnTextChanged event isn't even fired when I type in the
textbox.

Any suggestions?

<table style="width: 100%;">
<tr>
<td>
<asp:TextBox ID="txtTextBox1 " Width="190"
OnTextChanged=" OnTextChanged" runat="server"> </asp:TextBox>
<asp:ImageButto n ID="ImageButton 1" runat="server"
ImageUrl="~/Images/Go.gif" />
</td>
</tr>
<tr>
<td>
<asp:UpdatePane l ID="UpdatePanel 1" runat="server">
<ContentTemplat e>
<asp:ListBox Width="200" ID="ListBox1" runat="server">
</asp:ListBox>
</ContentTemplate >
<Triggers>
<asp:AsyncPostB ackTrigger ControlID="txtT extBox1"
EventName="Text Changed" />
</Triggers>
</asp:UpdatePanel >
</td>
</tr>
</table>

Nov 12 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

129
64577
by: Torbjørn Pettersen | last post by:
I've started cleaning up my HTML and implementing CSS. So far I've used FrontPage, but am switching over to DreamWeaver. Reading a bit on W3Schools.com and W3.org I see there are a lot of HTML code I never even knew existed. Among these are <em> and <strong>. What's the difference between these two and <i> and <b>? -- Torbjørn Pettersen Editor/Webmaster
3
2763
by: | last post by:
I have been researching articles on google on how to create a simple RSS feed that sucks <title><blurb><link><date> out of a sql server 2000 database via an aspx page. I know it has to be pushed into a <xml> document but not sure which direction to take. Is there perhaps a starter document which uses sql server as the data source I can tap into.
4
1892
by: martijn | last post by:
H!, Is it possible to get a <tag:id>value</tag:id> value ? When I do this: ----------------------------------------------------- theXML = """<?xml version="1.0"?> <title>The Fascist Menace</title> """ import xml.dom.minidom as dom
14
1785
by: dananrg | last post by:
Been using the ODBC module for Python 2.1 (Win32) and had another question. When I return data from date columns, it's in a strange object form, e.g. <something or other> (don't have the output in front of me>. What's an easy way to convert date objects into a human-readable string? I'm using this module to extract data from an Oracle database, then converting it to a flat-file for import into an old flat-file database on a mainframe. I...
2
1022
by: Jeff | last post by:
hi asp.net 2.0 In a webpage I have a GridView displaying a collection of data. This collection of data is a collection of objects based on a custom class. where each object represent a record in the database.. this collection is stored in the cache so that maybe next time a trip to the database isn't needed
3
1410
by: Jeff | last post by:
hi asp.net 2.0 i've used connectionstrings like this one for my webproject: connectionString="Server=Pdc1;Database=Testing;Integrated Security=false;User ID=tester;Pwd=hardtoguesspwd;" /> But now I need to change to using odbc as the webhosting company only support odbc. So from my understanding I need to change my
0
1073
by: Jeff | last post by:
Hi I'm following this tutorial: http://dev.live.com/gadgets/sdk/docs/default.htm And downloaded that sample file. Now I've created a simple web gadget project on my own:. I just made a copy of the Hello gadget in that sample.zip file and changed the namespace and file reference as the tutorial says
4
2426
by: Jeff | last post by:
Hi asp.net 2.0 I'm trying to implement a HyperLinkField into my GridView.. The SqlDataSource returns a field which is paths to files (each row in the GridView should have link to a file). I've specified DataTextFields and DataNavigationUrlFields with the column name which holds the path to the document. But the GridView doesn't create a
3
2375
by: Jeff | last post by:
hi I'm wondering how to open a web browser window in VS2008. I've created a simple windows Live Agent and just want to test it in the VS2008 before I deploy it... any ideas how to open a webbrowser window in VS2008, or is it enough to use my standard webbrowser (IE7) and navigate to port 8000?
0
9528
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9310
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9236
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8235
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6792
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6072
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3298
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.