Submit to external code - InfoPath Dev
in

InfoPath Dev

Submit to external code

Last post 02-24-2006 07:13 AM by Matt Faus. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-22-2006 11:19 PM

    • kikhan
    • Not Ranked
    • Joined on 02-22-2006
    • Pakistan
    • Posts 4

    Submit to external code

    Hi.

    I used the method describe at

    http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1609

    I have a windows application can now open a infopath form from a template on local disk. Now, is there anyway to have a submit/save button on form and when user clciks on this button, a c# event handler handels the request.

    the windows application is not a InfoPath project.
  • 02-23-2006 06:22 AM In reply to

    Re: Submit to external code

    You will have to install the Toolkit for Visual Studio in order to use managed code behind InfoPath forms. If you are using Visual Studio 2003 you can download the toolkit from the link on the left side of this page. If you are using Visual Studio 2005, you will have to download the toolkit from MSDN, or order a CD.

    Once the toolkit is installed, open Visual Studio, select New | Project from the File menu, and then select InfoPath Form Template from the appropriate section in the New Project Wizard.

    Once you click Next it will ask you whether you would like to create a new form template or import one. Select import and then browse to the .xsn that you have saved. After completing this you should be able to design your form in InfoPath and then add code in Visual Studio. Please note that if you were using a scripting language behind the template before the old code will not translate into the new managed code language and you will need to rewrite all of that logic.

    I hope this helps!

    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 02-23-2006 10:01 PM In reply to

    • kikhan
    • Not Ranked
    • Joined on 02-22-2006
    • Pakistan
    • Posts 4

    Re: Submit to external code

    Thanks for replying Faus.

    Basically my application will load the form at runtime i.e. I don't have the form at design time that is why I said my windows application is not an InfoPath Project.

    I have InfoPath Toolkit for VS.Net 2003 installed.

    My target is to load the form at runtime like
    http://blogs.msdn.com/bowerm/articles/211757.aspx

    but this solution uses explorer control to display the form, while my requirement is to control the form programatically, receive events and manipulate form fields.
  • 02-24-2006 07:13 AM In reply to

    Re: Submit to external code

    Ok, I think I see what you're trying to do now. Sorry for misunderstanding earlier.

    I was working on something similiar to this recently, actually. My goal was to call an InfoPath form from within an application, passing a parameter in to switch to a specific view depending on the state of the application, receive data in InfoPath, write to XML, and have the application read the XML. I found this page to be helpful:

    http://geekswithblogs.net/bpaddock/archive/2004/05/14/4907.aspx

    However, you are trying to do a little more than I was trying to do by actually catching events in InfoPath in another application. I don't know if this is possible, but you might be able to hack your way into it. One idea might be to have InfoPath write out an XML file within the event handlers that you are trying to catch and have your application "watching" for these XML files, and once they are found run your code. That's just a thought. Anyway, if I understand correctly what you are trying to do, I think it will be rather difficult.

    I hope this helps, please let us know if you figure it out, I would be interested to see what you come up with.

    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.