In one of our screens, we have a list of items on the left pane and “details” screen on the right pane. The details pane appears only when one of the items is selected. If no item is selected – we show some sort of empty pane that describes the usability of the screen and ask the user to select an item in order to continue.
In order to switch between the details\empty panes, I draw two span elements and played with their visibility property. The controls are partially rendered which means that if the user did not select an item, no “details” controls or rendered and neither their validators. The problem is that ASP.NET register the validators only once (via ValidatorOnLoad() method) and on the first time the screen is rendered, the controls are not there yet (no item is selected by default).
ScriptManager.RegisterStartupScript(this, this.GetType(), “HookupManuallyToValidators”, “ReRegisterValidators();”, true);
if (typeof(Page_Validators) == “undefined”)
var i, val;
for (i = 0; i < Page_Validators.length; i++)
val = Page_Validators[i];
1-0 to lnbogen .vs. asp.net