Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Problem with textchanged event

Reply
Thread Tools

Problem with textchanged event

 
 
David
Guest
Posts: n/a
 
      12-12-2008
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


 
Reply With Quote
 
 
 
 
David
Guest
Posts: n/a
 
      12-12-2008
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
"David" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is a button Click event also called when a textbox TextChanged event is called??? S_K ASP .Net 6 11-08-2007 07:44 PM
Textchanged's event start before the button click's event ? moi ASP .Net 0 03-15-2006 05:28 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Building Controls 1 05-28-2004 06:23 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net 2 05-25-2004 11:45 PM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Datagrid Control 0 05-25-2004 01:45 AM



Advertisments