c# - Trigger the change event of a textbox in jQuery -


I have an asp: text box with ASP: this is a number, so to validate RegularExpressionValidator Obviously an onchange event will be attached with this text box while rendering. In addition, I add a change event to $ (document). When the price changes, then to calculate something.

  & lt; Asp: textbox id = "myText" runat = "server" /> & Lt; Asp: regularexpressionvalidator id = "myRev" ControlToValidate = "myText" runat = "server" & gt; * & Lt; / Asp: regularexpressionvalidator & gt; $ (Document) .ready (function () {$ ('[id $ = myText]'). Bind ('change', function () {// do something}}. Change (); // change event force absolutely Initially}};  

My function will be executed in comparison to .NET-generated JS due to later time. But asp.net js throws an error I found in js :

  function value change event (event) {...}  

and all the events that were found. Element, Event.Ellement, Event.SocElement Faucet What causes the exception, do I have something wrong? Thanks? Thanks.

Edit

It's working fine in ASP.Net 4 vs. 2010, MS Bug has been proven.

$ (Function () {$ ('# & lt;% = myText.ClientID% & gt;'). Change (Tasks) {/ / Stuff}). Trigger handler ('change');});

How is your other event connected, this Without Ilkul, I would be a good idea, because the event does not bubble to capture. Net handler


Comments