This is a migrated thread and some comments may be shown as answers.

Validation Controls added by AjaxManager not working

2 Answers 73 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Nathan
Top achievements
Rank 1
Nathan asked on 03 Apr 2009, 06:59 PM
I have a fairly complex situation here that results in validation controls not working, either on the client side or when calling page.Validate().

I have a tabstrip (and associated multipage).
On Tab 1, an item is added in an ajax panel and saved.  When the user switches tabs, ajaxManager.ajaxRequest forces a repeater on page 2 to reload from the data source.  The repeater contains an item template which contains a user control that shows the details for the added object.  The repeater is inside the ajax panel and the user controls there have standard asp validators.  Any validators that were present when the page loaded in work fine, but any added as a result of the repeater re-binding fail to run, even when forced to run server side.  I tried rebinding the repeater in every page_load call to tab 2, but that didn't fix the problem.

Anyone have any ideas?

2 Answers, 1 is accepted

Sort by
0
Nathan
Top achievements
Rank 1
answered on 03 Apr 2009, 11:58 PM
Withdrawn, fixed.  The solution involved making my user control save methods a little smarter, and executing the tabstrip change tabs in the ajaxmanager onResponseEnd, rather than where you'd expect.

Mods, feel free to delete this one!
0
Chris
Top achievements
Rank 1
answered on 30 Oct 2009, 08:18 PM
Can you be more specific about your solution? I think I have the same issue with validators that are in a MultiView View not working if they weren't loaded initially.
Tags
Ajax
Asked by
Nathan
Top achievements
Rank 1
Answers by
Nathan
Top achievements
Rank 1
Chris
Top achievements
Rank 1
Share this question
or