.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Error submitting browser enabled form using this.Submit()

Posted By:      Posted Date: September 10, 2010    Points: 0   Category :SharePoint
I'm trying to submit my Infopath form by calling this.Submit() method from my button click event handler.  According to Microsoft - Note: You can write a custom submit event handler for the Submit event, and then you can programmatically call the event handler by using the Submit method. This type or member can be accessed from code running in forms opened in Microsoft Office InfoPath 2007 or in a Web browser. Its not working for me and throws this exception  - XmlForm.Submit cannot be called from the SubmitEventHandler. BTW - I'm able to submit same form without any problem if I don't use this "Submit()" method.  I really want to know why its behaving like this.  Looks like a BUG.  Thanks, Suhaib Khan

View Complete Post

More Related Resource Links

InfoPath Form: Encountered error while trying to submit the form from the browser

Hi,I have created a form in InfoPath, and i filled in the form in the browser. But there's an error apppeared when i tried to click on the submit button to submit the form. May i know is there ways for me to check what cause this error because i have no idea about this. "There has been an error while processing the form. There is an unclosed literal string. Line 1, position 543. System.Xml.XmlException: There is an unclosed literal string. Line 1, position 543. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr) at System.Xml.XmlTextReaderImpl.ParseAttributes() at System.Xml.XmlTextReaderImpl.ParseElement() at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at Microsoft.Office.InfoPath.Server.Xml.InfoPathXmlDocument.Load(XmlReader reader) at Microsoft.Office.InfoPath.Server.DocumentLifetime.DataObject.<>c__DisplayClass3.<.ctor>b__0() at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.Exception

How to solve this error This form template is not currently browser enabled?



I would like my form be browser enabled. Users wont use InfoPath to fill it.

Enviroment: Sharepoint2010, form was created in Infopath2010 

InfoPath form properties:

  Security and Trust: Automatically dtermine security level

  Compatibilyty Form type: Web Browser Form

The form was published as a content type to my site. I checked my form for browser compatibility - it was ok.

In my Form library 

   Allow managment content type = Yes

   Opening Document in the Browser = Open in Browser

The features Enterprise feature are enabled on site collection feature and site feature.


But it is still impossible to view my form in browser. The error is appeared: This form template is not currently browser enabled.

Who knows what is wrong? How to make my form web browsable?






Attachment upload error on browser based InfoPath form



I am having an interesting problem with browser based InfoPath forms in SharePoint 2007.  For some reason the file attachment control is not working any more.  It was working fine in July, but now it will not allow file attachments over a few kb.  I tried a 34KB file and I get the error below, a 2KB file works fine.

Unable to connect to SQL Server session database. The connection string (server='SPDB', database='SharedServices1_DB') was returned by an instance of the IPartitionResolver type 'Microsoft.Office.Server.Administration.SqlSessionStateResolver, Microsoft.Office.Server, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.   at System.Web.SessionState.SqlSessionStateStore.ThrowSqlConnectionException(SqlConnection conn, Exception e)
   at System.Web.SessionState.SqlSessionStateStore.HandleInsertException(SqlConnection conn, Exception e, Boolean newItem, String id)
   at System.Web.SessionState.SqlSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem)
   at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs)
   at System.Web.HttpApplication.SyncEven

Infopath 2007 print view in browser enabled form with Print button


Hi i create a  print view brower enabled form in Infopath 2007 with header and footer. In Infopath works fine. Margin was ok, header and footter to. But then i try to print this browser the margin, header and footer it changes to default setting of browser ? I try also create a print button in form with VS 2008 code, but method :

this.print(); not working.

It is possible to print the "print view" in browser as the same like in Infopath 2007? Does anyone have the code how to create a print button in C# on browser enabled form?

Deploying InfoPath 2007 form to WSS 3.0 as browser enabled


Please Help! I've created an Infopath form and wanted to deploy the form as browser enabled to WSS 3.0? What are the different options I can do this? If i cannot use a form then i would like to  create a custom list with all the form fields but the user should be able to enter information in the list and he should see only the information related to him. I don't want to give access of the whole list to each and every user. Only the administrator should be able to see the whole list. The form was actually a user access request form.

Any help and suggestions is appreciated.


Infopath form - browser error client error


I am facing a problem with browser enabled infopath form. I have developed this in infopath 2007. I have few fields in a repeating table. It contains Number of units, qty , subtotal and total. Total is sum of all sub totals and Sub total is  multiplication of units and qty. I am able to insert new items in preview and getting subtotal and total. I have published it in sharepiont as browser enabled form as a content type. When I opened the form in browser and insert new item in repeating table then I am not getting my subtotal and total updated. I am getting those for only first row. other rows are not working. This is working with infopath client.  Please help me out..



Programmatically Mapping Custom SharePoint Column on Non-browser Enabled InfoPath Form


I have an InfoPath form, which, due to control requirements, is not browser enabled. It is being programmatically added as a content type to SharePoint (MOSS 2007). All users have Office 2007 installed so they will be able to open the form. I also have a custom multi-line column in the SharePoint document library. I can manually publish the form and map the column to a field of the form, but I need to be able to do this programmatically.

We are currently deploying the forms by modifying the publish url in the xsf during install. We have tried to modify the site coulmn GUID in the template xsf during install without success.

Does anyone have any ideas as to how we can programmatically promote the InfoPath field so it is visible in SharePoint?

Programatically close web enabled form after submit


Hi all

I have an InfoPath 2007 form, which is web enabled and deployed to Forms Server 2007.

On the form I have a button. What I want to happen when the button is pressed is this:

1. My custom code behind should be executed. The custom code calls an external aseembly (common to ALL my InfoPath forms) which has a method that includes a dataconnection.Execute which will submit the form.

2. Close the form IF the submit went well.

Currently, I have a code behind and a rule on the button. What I am trying to get working is that the code behind sets a status flag on the form to "Success" and then executes the data connection. If an exception is thrown, I set the status flag to something else ("Failed") and rethrow the exception. In the rule of the button I then check this status field in the condition of the rule and if it is set to Success I close the form. What happens is, that the form is not closed uppon succesfully execution of the data connection. I am not sure in what order the code is run; Is the rule fired first or is the .NET code behind? It appears that the .NET code IS fired... and if the form was closed in the rule, then I wouldn't expect that to happen. So that means the rule is fired last. On the other hand the value set in one of the fields is not present upon validation of the condition of the rule, so tha

Browser Enabled Forms - "Unknown Error" when trying to open


Hi All,

I'm running SharePoint 2007 SP2 Enterprise on Server 2008 R2, and a SQL 2008 back end, Everything has been running perfectly up until recently.

This morning I got a call that users are unable to open existing forms in the browser.  The Infopath "Loading Form" dialog appears, but a SharePoint "Unknown Error" appears in the background and I get nowhere?

I've checked in the 12hive logs and do not see anything helpful.


Any ideas?



Error submitting InfoPath Web Form

I recieve a message "The form cannot be submitted because of an error" when submitting to a SP Doc Lib.  Design Checker doesn't register any errors.  I have checked the form and don't see anything that would cause the error.  I have also compared the DL columns with the form to ensure they match.  Not sure how to check on the server for this error....

Convert Infopath 2010 browser enabled form to PDF when Submiting

Hi all, Im having a infopath form browser enabled form. I need to sumbit it to a document library when submiting as a pdf. In the blogs and forums they said like you can use this.currentview.expot() but in the infopath 2010 there is no method like export, i refere the microsoft.office.infopath.server.dll (14/bin) as well. Any Idea ? Thanks in advanced

infopath 2007 submit error - in browser


If I load the form in the InfoPath Desktop Client, the form submits just fine.

However, if i load via the web browser i get a "An error occurred while the form was being submitted."

how do i get more info on this error?
   There is nothing in the event viewer.

Infopath Browser Enabled Form - Filters dont work inside repeating table



I have been trying to create a Browser Enabled form to be used as a Sales Order form, the form will work in the following way.

It will pull in info from a sharepoint list with Customer Codes, it will pull in info from another sharepoint list with customer contact information which will be filtered based on which customer is selected.

There will then be a repeating table to place the order items.  The repeating table has 8 columns, 6 of which are lookups against 1 sharepoint list (all the columns are in the same list).

The sharepoint lsit data looks something similar to this:

Item Type                 Item Provider                    Product Relation              Product Description                Delivery Team              Cost
Service                     Us                &

Cascade dropdown lists in a repeating table (Browser-enabled form)


I am sure similar questions have been asked before...but:

I have a repeating table with 2 DDLs...let's say: state and city

city is currently sourced from web service which takes the value of the state as parameter.

I allow a user to add a new row in the repeating table to select another state ; and thus return related cities on the same row as the state..and so on...

The obvious question is: is that achievable without code-behind?  I have read about people using "current()" but it all seem to apply to the filter data which does not work for browser-enabled form....so should I use Web services at all?

Thanks in advance.


Infopath 2007 form Submit error - Web client

I have set up a Infopath 2007 forms server
and published an Form that submits to a Web Service.
       On the same server, On a different port.

If I load the form in the InfoPath Desktop Client, the form submits just fine.

However, if i load via the web browser i get a "An error occurred while the form was being submitted."

Any Ideas?

how do i get more info on this error?
   There is nothing in the event viewer.


Infopath 2010 browser enabled form need to save form immediately prior to submission to a different



Using SharePoint 2010 and Infopath web browser admin approved forms. I have a big form that will take serveral edits over time via collaboration between two users prior to submission. I use two form libraries say WIP for work in progress and Submitted for submitted forms. There are different access permissions to the two libraries.

When a user submits a form from the WIP library to the Submitted library I want to set a flag on the WIP form to say submitted=Yes so that if they go back into the original WIP form they cannot submit a second time with the same form. I use this flag field to set a read only view of the form.

The trouble is that when I set the flag before triggering the submit then the flag is set but the current form is not saved before it is submitted as a new form to the submitted library so the flag never gets set on the current form!

Ideally I want to force a save to the WIP form immediately prior to a submission but after I set the flag field value. I am having difficulty in finding out how to do this - any suggestions? I realise that submit is a form of save but I want to simply save the current form as part of the submit action. What is happening is that the form is submitted to the other library but THIS form is not saved. I cannot depend on the user to save using the Save button.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend