sharepoint-2010infopath2010applicationpage

SharePoint Application Page: Using ASP button to open infopath form


I am trying to use an ASP.NET button in a SharePoint application page to open a modal dialog showing an specific infopath form. I know I have to upload infopath form to central administration and I know how to open a modal dialog using sharepoint client side object model.

So the problem is: What server side address should I use for a specific infopath form named for example "MyInfoPathForm.xsn" with form URN "Test-URN"?


Solution

  • For those of you who pass by this page and this is your same problem I figured it out myself.

    There is a web part in sharepoint for displaying an infopath form. You have to configure this web part to show your infopath form by publishing your infopath form to a sharepoint list or document library. Then you can do something such as adding another application page hosting the web part and setting the address of the modal dialog to this application page. BTW you can find the web part in "Forms" tab when adding web parts to a page.

    The server side control is Assembly="Microsoft.Office.InfoPath.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.Office.InfoPath.Server.Controls.WebUI". You can use infopath web service connection to send and receive data to and from your form then.