I am working on an MVC site which has an XForm form on one of the pages.
I added code in the global.asax.cs file like it is done here:
protected void Application_Start(Object sender, EventArgs e)
{
// some code here
XFormControl.ControlSetup += new EventHandler(XForm_ControlSetup);
}
public void XForm_ControlSetup(object sender, EventArgs e)
{
XFormControl control = (XFormControl)sender;
control.BeforeLoadingForm += new LoadFormEventHandler(XForm_BeforeLoadingForm);
control.ControlsCreated += new EventHandler(XForm_ControlsCreated);
control.BeforeSubmitPostedData += new SaveFormDataEventHandler(XForm_BeforeSubmitPostedData);
control.AfterSubmitPostedData += new SaveFormDataEventHandler(XForm_AfterSubmitPostedData);
}
public void XForm_ControlsCreated(object sender, EventArgs e)
{
XFormControl formControl = (XFormControl)sender;
// the rest of the code here
}
[ContentType(DisplayName = "Formulärsida", GUID = "066267cd-af44-47db-a7e3-6aec27543d6c", Description = "")]
public class FormsPage : EditorialPage
{
[CultureSpecific]
[Display(
Name = "Formuläret",
Description = "Formuläret",
GroupName = SystemTabNames.Content,
Order = 1)]
[Required]
public virtual XForm Form { get; set; }
}
Controller:
public class FormsPageController : PageController
{
public ActionResult Index(FormsPage currentPage)
{
PageViewModel vm = new PageViewModel(currentPage);
return View(vm);
}
}
I attach to the IIS process, and add breakpoints in all the XForm events in the global.asax.cs file, go to the page having the XForm form and assumed that the events would be triggered. They are not.
I am working on an MVC site which has an XForm form on one of the pages.
I added code in the global.asax.cs file like it is done here:
and the other event handlers below ....
The view:
Model:
Controller:
I attach to the IIS process, and add breakpoints in all the XForm events in the global.asax.cs file, go to the page having the XForm form and assumed that the events would be triggered. They are not.
Any suggestions why?
Thanks for any kind of guidance!!