I am trying to submit Infopath form contained in XmlFormView control through ASP.NET button which is on a web page. I tried to write action for data submit on a hidden field and then changed the value of that hidden field in infopath through ASP.NET code but somehow infopath gives me error and closes form and says some rules were not applied. I want to submit Infopath form through ASP.NET button. I also tried including Submit event on the form template but I am not sure how to call that submit method in the form from the ASP.NET button click ?
Any help will be appreciated.