Problem with textchanged event

  • Thread starter Thread starter David
  • Start date Start date
D

David

Hi all,

using C#, ASP.NET 2.0

I have a textbox inside an AJAX updatepanel. The textbox has autopostback
set to true and the textchanged event declared.

When I come into the page, I pre-load the textbox with a value. If I change
the value and either tab or click away, the event is fired, however, the
textbox.text value has my OLD value not the new value I have just entered.

I have done a quickwatch on it but cannot see any properties with my just
entered value.

I thought the whole idea was to have the new value at this point.

Any ideas?
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
 
Doh!!!

Found the prob...

When the page loads, I fill my form. I don't have it in a !IsPostBack...

I hadn't realised that even with ajax postback, the page_load runs, so it
was preloading the textboxes BEFORE my event ran, therefore, putting my
initial values back in so that when the event ran, it took my initial
values.

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
 
Back
Top