Click here to Skip to main content
11,581,982 members (73,783 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# HTML5 IE9 WinForm , +
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.

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 3-Aug-11 19:51pm
Edited 8-Aug-11 10:23am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Hariarjunan at 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 at 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)

  Print Answers RSS
0 OriginalGriff 355
1 Sergey Alexandrovich Kryukov 220
2 Andy Lanng 110
3 virusstorm 109
4 Kornfeld Eliyahu Peter 90
0 OriginalGriff 1,358
1 Sergey Alexandrovich Kryukov 970
2 Abhinav S 671
3 F-ES Sitecore 505
4 Suvendu Shekhar Giri 448

Advertise | Privacy | Mobile
Web04 | 2.8.150603.1 | Last Updated 8 Aug 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100