Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / August 2004

Tip: Looking for answers? Try searching our database.

submit a form in managed code -> C#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mishma - 17 Aug 2004 13:37 GMT
Hi there,

I’ve got a form with repeating section, and I’d like to post one different
form in a WSS for each repeating section. I use managed code to submit each
form, but when I click the send button I’ve got a security permission error.
Anyone knows where is the problem ???

The code I use to submit each repeating section is :

// Number of repeating section
IXMLDOMNodeList nbIS = thisXDocument.DOM.selectNodes("/my:SA/my:mesIS");
                   
for (int cpt=1; cpt<(nbIS.length); cpt++)
{    
        string strURL = "http://myurl/myform" + cpt + ".xml";
        MSXML2.XMLHTTP oXmlHttp = new MSXML2.XMLHTTP();

        oXmlHttp.open("HEAD", strURL, null, null, null);
       
oXmlHttp.send(thisXDocument.DOM.selectSingleNode("/my:SA/my:mesIS["+ cpt
+"]").xml);

        if(oXmlHttp.status == 404)
        {
                  oXmlHttp.open("PUT", strURL, null, null, null);
                 
oXmlHttp.send(thisXDocument.DOM.selectSingleNode("/my:SA/my:mesIS["+ cpt
+"]").xml);

                            if (oXmlHttp.status == 200 || oXmlHttp.status
== 201)
                             {
                                   thisXDocument.UI.Alert("GOOD");
                             }
         }
}

I translate this code from a JScript sample to C# but I don’t know if it’s
good.

Thank U !
Matthew Blain \(Serriform\) - 17 Aug 2004 19:48 GMT
Use the SP1 DAVAdapter, it will make your life much easier!

--Matthew Blain
http://tips.serriform.com/

> Hi there,
>
> I've got a form with repeating section, and I'd like to post one different
> form in a WSS for each repeating section. I use managed code to submit each
> form, but when I click the send button I've got a security permission
error.
> Anyone knows where is the problem ???
>
[quoted text clipped - 32 lines]
>
> Thank U !
Mishma - 18 Aug 2004 10:05 GMT
SP1 DAVAdapter ??? Can you tell me more about it please because I don't find
anything about that in my web research.

Thank u

"Matthew Blain (Serriform)" wrote:

> Use the SP1 DAVAdapter, it will make your life much easier!
>
[quoted text clipped - 44 lines]
> >
> > Thank U !
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.