• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1045
  • Last Modified:

ASP.NET Textbox's Textchanged event not firing

HI Experts,

I have a textbox that ahs autopostback true and handles onchange event. It works fine. But here is the scenario:

firts i type a number in textbox(Let's say 4) and tab out, it fires the event.

Now, i change number using javascript  to let's say 5 it won't fine. perfectly fine

Now, I change number back to 4, the event should fire, but it does not.

I .net generates some JS code that keep track of whether value in textbox has changed but i think it only keeps track when u tab out not when u change value using JS.

What can i do then?

  • 2
1 Solution
Alfred A.Commented:

You can try doing a workaround on this one by doing a postback server-side using javascript after changing the number back something like the following for example,

document.forms(0).submit() in javascript

I hope this helps.
Jignesh1507Author Commented:
Hi Alfred,
The textchanged event is fired in updatepanel as a AJAX call. Then I get the return value from AJAX call and examine it and i fi don't find the expected result, I open a new window using javascript.

Is there any way I can trigger the change in textbox using javascript programatically so that .Net generated javascript code recognize it and fire the textchanged event?
Alfred A.Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now