views:

11

answers:

0

Hi All,

I wrote a successful Custom Button which can Validate multiple Validation groups on the same page.

In doing so, I had to override the default Microsoft's ValidationSummaryOnSubmit method to suit my needs. ValidationSummaryOnSubmit method internally uses Page_ValidationSummaries property.

function ValidationSummaryOnSubmit(validationGroup) {
if (typeof (Page_ValidationSummaries) == "undefined")
    return;
var summary, sums, s;
for (sums = 0; sums < Page_ValidationSummaries.length; sums++) {
    summary = Page_ValidationSummaries[sums];

One of my colleague pointed out that what will happen in case Microsoft changes the ValidationSummary control and renames the Page_ValidationSummaries attribute to something else.

I guess, when updating to new .net Framework, we need to update this properties to whatever new it is. Though the change will be quite easy, but still, not good to write it framework dependent, wherever it's possible to.

From your experience, is there any chance Microsoft changes the core Page_ValidaionSummaries (or any other core Page attributes) that frequently? Chances are less but is there any better way to override the default javascript so that it will be framework independent.

Everything is custom except the Page_ValidationSummaries attirbute. So, in case of name change by Microsoft, only Page_ValidationSummaries has to be changed.