I am hosting an XmlFormView control in my ASP.NET page (SharePoint site page) and I want to submit the form programmatically when the user clicks an ASP.NET button. So, I wrote some code like this:
// make sure the XmlForm property is not null by calling this
xmlFormView.DataBind();
// submit the form
xmlFormView.XmlForm.Submit();
This code actually runs without any exceptions being thrown, but my form's submit method is never called! Not sure if it matters or not, but my form is submitting with custom code ("Perform custom action using code" in the "Submit Options" dialog).
Any ideas?