Textchanged event fires on every post

G

Guest

I used the textchanged event of textbox and set the autopostback property to
true. The textchanged event should fire when the content of the textbox is
changed and user tab out of the textbox control. However, textchanged event
fires whenever there is a postback, even when I click a button that send
postback. Can anybody tell we what change I should make so that textchanged
event only fire when the content is changed?
 
G

Guest

Hi Samuel,

"The textchanged event should fire when the content of the textbox is
changed and user tab out of the textbox control."

That is not true. Not all of the web control cause a postback. TextBox is
one of them. Please take a look at this to understand the asp.net event model
better:

http://msdn.microsoft.com/library/d.../en-us/vbcon/html/vbconWebFormsEventModel.asp

If you want to cause a postback on every change on the textbox immediately,
you will have to use a javascript function to create a manual postback.


Hope that helps,

Ethem
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top