Solved

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

Posted on 2003-11-05
3
1,159 Views
Last Modified: 2010-08-05
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
Comment
Question by:chaofan
3 Comments
 
LVL 69

Accepted Solution

by:
Callandor earned 125 total points
ID: 9690363
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
 

Expert Comment

by:visualhaha
ID: 9690549
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
seriesUp challenge 7 107
word0 challenge 4 54
eclipse package explorer vs project explorer view 2 33
SUM 2 INTEGER ARRAYS INTO 1 10 62
This is an explanation of a simple data model to help parse a JSON feed
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now