473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

OnTextChanged Event for a label control

Sue
Hello

Is there an equivalent of a OnTextChangedEvent for a asp: label
control in asp.Net 2.0. Every time the text of a label changes, I want
the items in a listbox control cleared.

TIA
Sue..

Mar 13 '07 #1
1 8990
Since ASP.NET controls are rendered to the client as HTML (in this case, a
<SPANtag), you need to be thinking about what client-side event would work
for you, the server-side events are only triggered if a postback is
initiated. So, you should add this to your asp:label control via the
page_load() event handler:

lblSomething.attributes.add("onChange","clientSide Function()")

And then add a client-side function that matches the second parameter you
gave above that does the clearing of the listbox data.

"Sue" <iy*********@hotmail.comwrote in message
news:11*********************@e65g2000hsc.googlegro ups.com...
Hello

Is there an equivalent of a OnTextChangedEvent for a asp: label
control in asp.Net 2.0. Every time the text of a label changes, I want
the items in a listbox control cleared.

TIA
Sue..

Mar 13 '07 #2

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

Similar topics

2
by: huzz | last post by:
I have a TextBox field as shown below <asp:TextBox id="txtIssueTo" runat="server" OnTextChanged="UserExist" AutoPostBack="true" Text="UserName"></asp:TextBox> The UserExist method takes the...
3
by: Neil | last post by:
Hi, I have a datagrid containing a number of item templates, inside of these item templates I have various controls like the textbox. The user is able to edit all the fields on the datagrid at...
3
by: kbrandl | last post by:
On my page, there is a textbox at the top that contains a date -- and a fully-editable datagrid below (each row in the datagrid contains an editable textbox, along with some other controls). The...
1
by: Alex Nitulescu | last post by:
Hi. I have created a web-based file manager. Now I'd like to watch a folder for changes, and when a change occurs I'd like to refresh my page. Okay. So I have created a FileSystemWatcher set on...
4
by: Chris | last post by:
I think I already know the answer to this but here goes. I've read the other postings but no solutions for this. If a user enters a textbox, there is no 'onenter', etc. to control firing off a...
1
by: mdipiet | last post by:
I've got a form that is supposed to validate data entry from a bar code scanner. The scanner is set up to add a carriage return at the end of the data in the barcode, which should fire the...
4
by: MattB | last post by:
Hi. I'm working on an intranet application that requires a user to input information about themselves. I have a user control with a couple of textboxes that I want the user to enter their weight...
1
by: Fred Dag | last post by:
As far as I can work out when using the OnTextChanged event I cannot get the TextBox and Labels values when the event fires as they are populated by a <asp:repeater and so don't have values. If...
1
by: Sue | last post by:
Hello Is there an equivalent of a OnTextChangedEvent for a asp: label control in asp.Net 2.0. Every time the text of a label changes, I want the items in a listbox control cleared. Tried...
1
by: madhanmss | last post by:
Hi, i have two textboxes to enter the start and end dates. I am using javascript calendar to populate these text boxes. Based on the chosen date values, i need to filter a treeview control. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.