I have a browser based infopath form with dropdown list and the list is populated with values from a SharePoint List(using Data Connections) that contains two columns title and Body(Rich text field allows user to format text). I have set the dropdowns displayname to use Title and the Value column is set to use "Body" column.

When the form is rendered on the browser user can select an value from the dropdown list and click on the "Add ... condition" button and the formatted text from dropdownlist value is assigned to rich text box(see figure 2). I'm using VSTA code(on button click i have some code) to assign the value selected from the dropdown list to the Rich Text Field.

The problem is after the button click event the dropdown list is populated with the XHTML tag in the drop down list. If I select another item and click on the button then the Dropdownlist is refreshed and it doesnt show the item with HTML tags... Its bit weird...

Any suggestions... welcome.

Figure 1: enter image description here Figure 2: enter image description here

1 Answer 1


Found the problem

When you select a item from dropdownlist it is stored in the XML file and on postback you will be able to read the content of XMLNode and assign it to RTF conrol but since the value is not cleared from XMLNode it is displayed in the Dropdownlist.

So after assigning the value to RTF control I cleared the XMLNode value.. something like this


After the postback the XML content will not appear in the dropdownlist...

Hope this helps someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.