S
Sudip_inn
Guest
i was trying to load a site into web browser control and site is not loading rather throwing error script error etc
my pc is win7 & IE version 11. when try to load this site Inline XBRL Viewer into my web browser control then getting many script related error and site is not loading properly.
i came to know if i can add some meta tag into web page then it will load. so i added this code to meta tag into lading site which does not work for me.
here is code. i added this code in web browser DocumentCompleted event: to add meta tag to solve my issue but fail
Forms.WebBrowser browser = sender as Forms.WebBrowser;
if (browser == null) return;
Forms.HtmlDocument htmlDocument = browser.Document;
if (htmlDocument == null) return;
Forms.HtmlElement ie8MetaElement = htmlDocument.CreateElement("META");
ie8MetaElement.SetAttribute("content", "IE=8");
ie8MetaElement.SetAttribute("http-equiv", "x-ua-compatible");
Forms.HtmlElement headElement = htmlDocument.GetElementsByTagName("HEAD")[0];
headElement.Children[0].InsertAdjacentElement(Forms.HtmlElementInsertionOrientation.BeforeBegin, ie8MetaElement);
please tell me how could i fix this issue with minimum coding change. screen shot attached
![original?v=v2&px=-1.jpg original?v=v2&px=-1.jpg](https://www.computerhelp.forum/data/attachments/56/56549-9adf9967a065f79604b3822dda8c3177.jpg?hash=mt-ZZ6Bl95)
i also used a code from this link Configuring the Emulation Mode of an Internet Explorer WebBrowser Control
which throwing a error called Failed to update browser emulation version
looking for guide line. thanks
Continue reading...
my pc is win7 & IE version 11. when try to load this site Inline XBRL Viewer into my web browser control then getting many script related error and site is not loading properly.
i came to know if i can add some meta tag into web page then it will load. so i added this code to meta tag into lading site which does not work for me.
here is code. i added this code in web browser DocumentCompleted event: to add meta tag to solve my issue but fail
Forms.WebBrowser browser = sender as Forms.WebBrowser;
if (browser == null) return;
Forms.HtmlDocument htmlDocument = browser.Document;
if (htmlDocument == null) return;
Forms.HtmlElement ie8MetaElement = htmlDocument.CreateElement("META");
ie8MetaElement.SetAttribute("content", "IE=8");
ie8MetaElement.SetAttribute("http-equiv", "x-ua-compatible");
Forms.HtmlElement headElement = htmlDocument.GetElementsByTagName("HEAD")[0];
headElement.Children[0].InsertAdjacentElement(Forms.HtmlElementInsertionOrientation.BeforeBegin, ie8MetaElement);
please tell me how could i fix this issue with minimum coding change. screen shot attached
![imgres](/proxy.php?image=https%3A%2F%2Fwww.google.com%2Fimgres%3Fimgurl%3Dhttps%253A%252F%252Fi.stack.imgur.com%252Fp3pHO.png%26imgrefurl%3Dhttps%253A%252F%252Fstackoverflow.com%252Fquestions%252F12216301%252Fobject-doesnt-support-property-or-method-webbrowser-control%26docid%3DcanLgyNx3YdF3M%26tbnid%3DpJk9uhsE-gZ5IM%253A%26vet%3D10ahUKEwiV1YjO3aXkAhUDLa0KHRDYCQUQMwhGKAIwAg..i%26w%3D448%26h%3D284%26bih%3D635%26biw%3D1366%26q%3Dc%2523%2520webbrowser%2520control%2520script%2520error%2520addeventlistner%26ved%3D0ahUKEwiV1YjO3aXkAhUDLa0KHRDYCQUQMwhGKAIwAg%26iact%3Dmrc%26uact%3D8&hash=fa4a82786bae26a7f124a4b5dd8fdba5)
![imgres](/proxy.php?image=https%3A%2F%2Fwww.google.com%2Fimgres%3Fimgurl%3Dhttps%253A%252F%252Fi.stack.imgur.com%252Fp3pHO.png%26imgrefurl%3Dhttps%253A%252F%252Fstackoverflow.com%252Fquestions%252F12216301%252Fobject-doesnt-support-property-or-method-webbrowser-control%26docid%3DcanLgyNx3YdF3M%26tbnid%3DpJk9uhsE-gZ5IM%253A%26vet%3D10ahUKEwiV1YjO3aXkAhUDLa0KHRDYCQUQMwhGKAIwAg..i%26w%3D448%26h%3D284%26bih%3D635%26biw%3D1366%26q%3Dc%2523%2520webbrowser%2520control%2520script%2520error%2520addeventlistner%26ved%3D0ahUKEwiV1YjO3aXkAhUDLa0KHRDYCQUQMwhGKAIwAg%26iact%3Dmrc%26uact%3D8&hash=fa4a82786bae26a7f124a4b5dd8fdba5)
![original?v=v2&px=-1.jpg original?v=v2&px=-1.jpg](https://www.computerhelp.forum/data/attachments/56/56549-9adf9967a065f79604b3822dda8c3177.jpg?hash=mt-ZZ6Bl95)
i also used a code from this link Configuring the Emulation Mode of an Internet Explorer WebBrowser Control
which throwing a error called Failed to update browser emulation version
looking for guide line. thanks
Continue reading...