Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi All,

I developing HTML editor using WebBrowser control. Which is work fine in IE8 compatible systems but not working in IE9. IE9 disabled the WebBrowser control because of this I'm not able to edit my this control. Below I shows the sample code of my program.

I drag the WebBrowser control into my Form.

C#
private IHTMLDocument2 doc;
private void Form1_Load(object sender, EventArgs e)
{
webBrowser1.DocumentText = "<html><body></body></html>";
doc = webBrowser1.Document.DomDocument as IHTMLDocument2;
doc.designMode = "On";
webBrowser1.Document.ExecCommand("Copy", false, null);
webBrowser1.Document.ExecCommand("Paste", false, null);
}


Kindly give the solution for this issue.

Hariharan A
Posted
Updated 8-Aug-11 10:23am
v2

1 solution

 
Share this answer
 
Comments
Hariarjunan 4-Aug-11 2:18am    
Hi Majumder,

Thanks for your soon reply. I saw pages from your links. Soon I will let you know once my issue solved.
Hariarjunan 5-Aug-11 0:56am    
Hi Majumder,

I tried the solution you gave but still my problem was not solved. I founded that what is the exact problem. There is no issue in WebBrowser control. I'm using "IHTMLDocument2" class that only blocking the WebBrowser control.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900