Hy all
I've a little problem. I need to write a dynamic page that render
control according to validation status return from previous control
validation status.
To be clear, I've page that starts requesting some info, then user
press a button, and the same page should show the new field only if
validation returns true. But it sounds not so simple to do.
According to line-guide this is what happens in the order
Page_load - load the control
Validation_Handler - check for validity of content
Page_prerender - last chance to modify content
Validation_handler could be skipped if the submitting button (those
with causevalidation, has the property setted to false, but this mean
that I should perform the check manually).
In a first moment I think, move the control creation on the
page_prerender, but I see that there the addhandler routine, despite
valid for compilator, is still unusefull because it's ignored by the
server, so the dynamic button (at least those need to perform the
causevalidation) should always create on the load. This wasn't a
problem.
But in a second moment, when passing for the validation_handler I saw
that creating control on the render event, because control wasn't
created yet the page.isvalid after a page.validate still return always
true.
Then started my problem. I really don't know how to display dynamic
control according to page's validate status.
Any help? Unfortunately I'm so focused on my idea now, that I'm not
able to see the right solution. It's more then 4 hours that I get round
problem, but I'm so blind to don't show the way to solve it. And I
don't wanna to think it's impossible. It was possible - with some
escamotage - with old ASP ...
Thanks
Andrea