views:

44

answers:

1

I have a page that loads different controls into a placeholder via a ComponentArt Callback based on the user's action (clicking a link).

I am running to this scenario:

  • Action 1 loads a control with ASP.NET validators into the placeholder.
  • Action 2 loads a different control with no validators (the first control is replaced and no longer on the page).
  • Submitting the page causes a javascript error since since the validator javascript objects are still on the page but the controls they validate are not.

Has anyone experienced this issue or have any ideas on how to resolve it?

A: 

This sounds like a bug with Action 2... how is the original control being removed? Either the validator should also be explicitly removed, or (is it all one control?) the way the control is being removed is incorrect. Not sure what you mean by "callback" in this context. Is this AJAX code? Or is a postback happening?

Bryan
Callback is the name of a third party control provided by ComponentArt. It allows you to do some server side logic and render results to the page without performing a full postback of the page. In this case, we are rendering different controls to the Callback's content area depending on the user's action. If more than one action occurs, then the first control is removed (overwritten is probably a better word), but the javascript generated for its ASP validators are still on the page.
ryan.rousseau
In that case, your best bet is probably to change the validator to a custom validator that handles this case.
Bryan