Try our conversational search powered by Generative AI!

XForm even (BeforeLoadingForm ) is not firing


In the start page, am able to display XForm property however, the event(BeforeLoadingForm ) in XFormInitialization is not firing up when form loads. Any specific reason not firing?? or am i missing anything in the configuration. Basically i need to modify the form before it shows up.



public class XFormInitialization : IInitializableModule
public void Initialize(InitializationEngine context)
XFormControl.ControlSetup += XFormControl_ControlSetup;

void XFormControl_ControlSetup(object sender, System.EventArgs e)
XFormControl control = (sender as XFormControl);
control.BeforeLoadingForm += control_BeforeLoadingForm;

void control_BeforeLoadingForm(object sender, LoadFormEventArgs e)
public void Preload(string[] parameters) { }
public void Uninitialize(InitializationEngine context){}

Thanks in advance.

Apr 22, 2015 13:03

Hi Raghu!

Is this an MVC based site? The event in question is only valid for WebForms and I'm not sure if there is a corresponding event for MVC.

Apr 22, 2015 13:30

Yes, its an MVC based site. Any ways , if i want to modify my xForm before loading whats the best pratiese??

Apr 22, 2015 13:43


I checked a bit more and there is no direct match to the Web Forms event. What is it you are trying to achieve? Knowing that might make it easier to suggest an approach.

Apr 22, 2015 14:16

Am actually want to replace text box with file upload control , when ever I find perticular css class name in text box control .

Apr 24, 2015 8:47
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.