I have gone through some posts but I am wondering if I can write whole logic in ASP.NET button so that when I click button it submits document to Sharepoint Document library. Solution I tried is used hidden field in Infopath 2010 and wrote rule on with action when field value becomes 1 submit form data. This works fine if I set the value from the infopath but when I try to set the value through ASP.NET button click form gets closed. Is there any other way of submitting Infopath form in XmlFormView through ASP.NET button ?
Thanks,
Dhaval