Missing TextChnged event on the page

O

Oleg

Here's what I have:
environment: .NET 2.0, ajax extensions.
UserControl and an aspx page where it's used.

UserControl has one Repeater control displaying a grid like data with one
column
displayed in asp:TextBox (ID='txtDelivery') controls. I added event
onTextChange for this control with a handler: 'txtDelivery_Changed' on the
back end.

I have MyTest.aspx page where this UserControl is used.
It's used inside of UpdatePanel tags.
When I debug, I change text in grid provided inside UserControl, it
asynchronously sends to back end to my event handler function
'txtDelivery_Changed'. Values recalculated and rebinding is called.
So far so good. My sample page works in a small sample project.

Now, I moved my UserControl with my tested code from MyTest.aspx into and an
'existing project' on a preexisting web page, and event
'txtDelivery_Changed' is never called now!
What happens in debug is 'Page_Load' is called on text change and process
finishes without ever going to 'txtDelivery_Changed' handler. (In MyTest page
Page_Load is called and then 'txtDelivery_Changed' is called). When I ask for
value Request.Form["__EVENTTARGET"] (in Watch window) it returns proper text
box name (which is a modified name from 'txtDelivery'). So, the server knows
who triggered event, but process never moves to the 'txtDelivery_Changed'
handler!

Notes: This existing project and 'existing' page is rather involved and has
some Ajax already implemented using old way of ICallbackEventHandler. Also
the page has numerous <form tags.
I also added attribute for @Page: EnableEventValidation="false" in order for
my other LinkButton to work in my UpdatePanel on the 'existing' page.

I tried to use in my UserControl:
protected override void Render(HtmlTextWriter writer)
{
Page.ClientScript.RegisterForEventValidation(MyRepeater.ID);
base.Render(writer);
}
with no avail. (it was supposed to make sure the event is registered)

Question: How do I get my event handler 'txtDelivery_Changed' being called?

Thanks,
Oleg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top