"Send to recipient" from asp.net page - InfoPath Dev
in

InfoPath Dev

"Send to recipient" from asp.net page

Last post 04-09-2009 08:22 AM by tolga. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 04-09-2009 08:22 AM

    • tolga
    • Not Ranked
    • Joined on 04-09-2009
    • Posts 1

    "Send to recipient" from asp.net page

    I created a very simply infopath form with I submit "to email". A wizard, in the infopath client, takes me through the steps on submitting the template as an email. The recipient gets the form as part of the email body. Great! Now I need to do the same thing using asp.net

    I did a lot of research and have not found much.

    1. How do I open an infopath template in managed code, c#, asp.net?
    2. I added references to the Microsoft.Office.Infopath namespace. Now, I have access to the OM, but I have no clue how to deal with the file/template.
    3. I found code which demonstrates how to submt the form using VSTO.

    var objEmailAdapter;
    var varTo = XDocument.DOM.selectSingleNode("/my:myFields/my:EmailInfo/my:To");
    var varCC = XDocument.DOM.selectSingleNode("/my:myFields/my:EmailInfo/my:CC");
    var varBCC = XDocument.DOM.selectSingleNode("/my:myFields/my:EmailInfo/my:BCC");
    var varIntro = XDocument.DOM.selectSingleNode("/my:myFields/my:EmailInfo/my:Intro");
    var varSubject = XDocument.DOM.selectSingleNode("/my:myFields/my:EmailInfo/my:Subject");

    objEmailAdapter = XDocument.DataAdapters("Email Adapter Name");
    objEmailAdapter.To = varTo.text;
    objEmailAdapter.CC = varCC.text;
    objEmailAdapter.BCC = varBCC.text;
    objEmailAdapter.Intro = varIntro.text;
    objEmailAdapter.Subject = varSubject.text;
    objEmailAdapter.Submit();

    All what I need to find out is how to do this in C# and asp.net. Any help is appreciated

     

    Filed under: , ,
Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.