I will give an official welcome for Patrick (site guru).
On my last InfoPath project I highly utilized the custom task pane to do many things. For instance, I embedded search functionality into the taskpane to call a webservice. You can pass data easily between the task pane and the InfoPath form.
Excuse the VBScript example but it will get the point across. It was what the client wanted.
This code is in the HTML page:
'===========================
' Adds items to the list box.
'===========================
Sub AddPartItem(displayText, valueText)
Dim oOption
Set oOption = document.createElement("OPTION")
oOption.text = displayText
oOption.value = valueText
document.GetElementById("lstParts").add(oOption)
End Sub
This code is in InfoPath:
Sub SendTaskPaneResultsPartsByNo()
Dim i
For i = 0 To XDocument.DataObjects(...).DOM.selectNodes(...).length - 1
call XDocument.View.Window.TaskPanes.Item(0).HTMLDocument.parentWindow.AddPartItem( _
XDocument.DataObjects(...).DOM.selectNodes(...)(i).text, _
XDocument.DataObjects(...).DOM.selectNodes(...)(i).text)
Next
End Sub
OR can go vice versa
In the HTML page I can go:
Call window.external.Window.XDocument.Extension.SearchForPartNumber(Parts.txtPartSearch.value, Parts.rdoPartNumber.checked)
And the create a method SearchForPartNumber in InfoPath.
If it sounds like you are going to use manage code, review this article. -
http://blogs.msdn.com/infopath/archive/2004/09/27/234911.aspxThe one issue I found with using .NET managed code and the custom task pane is that you will need to have full trust. Someone please correct me if I am wrong.