javascript - Triggering Text box change event

by Lahori 31. July 2007 13:51

If you try "onchange" function with a textbox it doesn't work.

That problem is a bug at the javascript level, where the "onchange" event simply does not fire after selecting something from the autocomplete list.
You can set the autopostback to false, and add this line in InitializeComponent:

this.txtName.Attributes.Add("onblur", "__doPostBack('" + txtName.ClientID.ToString() + "', '')");

On the server side, the TextChanged event will still fire only when the text changes. The only side-effect is that the page posts back even when the textbox value stays the same.

Tags:

Comments

6/5/2010 9:05:27 PM #

This is such a great resource that you are providing and you give it away for free.

designer handbags reviews Islamic Republic of Pakistan | Reply

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading



Copyright © iBlog.Pk, 2010. All rights reserved.

 

RecentComments

Comment RSS