• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1194
  • Last Modified:

How to run execCommand inside C#.net? SOS!

Hello everyone:

I create a new web application project in VisualC#.net. I put some html tag on it, like 'div'... I am trying to load execCommand function by using C#. I am not writing code in html file. Is this possible?

roughly idea like:
---------------------------------------------------------------------------
using mshtml; (if I am right!)
...

mshtml.HTMLDocument doc;
doc = thispage.getDocument(); // I don't know command, something like this.
// and then
doc.execCommand(a1,a2,a3);
---------------------------------------------------------------------------
Thank you so much! :)
0
chaofan
Asked:
chaofan
1 Solution
 
CallandorCommented:
If you're trying to write html tags to a file using C#, use the XmlTextWriter class.  You can output comments, elements, processing instructions, etc. and then render it with StreamWriter.
0
 
visualhahaCommented:
Hi Callandor:
Thank you for reply. I am beginner in C#.net.
XmlTextWriter&StreamWriter class may work, but I don't know how to get handle of "IE" which I am just opened.  Thanks again!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now