protected override void OnInit(EventArgs e) { base.OnInit(e); string[] splitFormName = AddressForm.Split('.'); // UIForm cant process full path of alternative form if object type is already specified. addressForm.AlternativeFormName = splitFormName.LastOrDefault(); addressForm.OnBeforeSave += addressForm_OnBeforeSave; addressForm.OnAfterDataLoad += addressForm_OnAfterDataLoad; // Hide default submit button addressForm.SubmitButton.Visible = false; InitializeAddress(); }
protected override void OnInit(EventArgs e) { base.OnInit(e); if (!StopProcessing) { string[] splitFormName = AddressForm.Split('.'); // UIForm can't process full path of alternative form if object type is already specified addressForm.AlternativeFormName = splitFormName.LastOrDefault(); addressForm.OnBeforeSave += addressForm_OnBeforeSave; addressForm.OnBeforeDataLoad += addressForm_OnBeforeDataLoad; addressForm.OnAfterDataLoad += addressForm_OnAfterDataLoad; // Hide default submit button addressForm.SubmitButton.Visible = false; InitializeAddress(); } // Propagate StopProcessing to address form to avoid JS errors for missing update panel addressForm.StopProcessing = StopProcessing; }