How to submit http form using C# from add-in ie ?

Add-in Express™ Support Service
That's what is more important than anything else

How to submit http form using C# from add-in ie ?
 
karim jebali




Posts: 4
Joined: 2011-05-25
may not have been clear enough with the question

I want to write C# code which submits form "form.submit() js code", use my add-in submitted it with the browser.
Posted 09 Jun, 2011 05:31:28 Top
karim jebali




Posts: 4
Joined: 2011-05-25
may not have been clear enough with the question

I want to write C# code which submits form "form.submit() js code", use my add-in submitted it with the browser.
Posted 09 Jun, 2011 05:33:38 Top
Eugene Astafiev


Guest


Hi Karim,

What version and build number of Add-in Express do you use?
Posted 09 Jun, 2011 06:39:38 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Karim,

I am not sure if I understand you correctly. But probably you just need to call the execScript method of the IHTMLWindow2 interface to perform the js code.
Posted 09 Jun, 2011 07:40:00 Top
karim jebali




Posts: 4
Joined: 2011-05-25
window._content.document.forms[id].submit() this is js code
i want to submit forms with C# code
Posted 09 Jun, 2011 10:09:10 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
In C# it will be:
(HTMLDocument.forms.item(<name>, <index>) as mshtml.IHTMLFormElement).submit();
Posted 09 Jun, 2011 13:42:25 Top
karim jebali




Posts: 4
Joined: 2011-05-25
It's working. Thanks for your help.
Posted 10 Jun, 2011 06:09:50 Top