Click here to Skip to main content
15,886,019 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have used a javascript code in my htmlpage where getComputedStyle has been used. It works excellent and help me to find out the css easily.

But there is a problem when I want to run this script using webbrowser from serverside. It shows a meseage : object doesn't support property or method 'getComputedStyle'.
I am using IE version 11.0.

This is my sample code:

C#
private void test_Click(object sender, EventArgs e)
        {

            webBrowser1.AllowWebBrowserDrop = false;
            webBrowser1.IsWebBrowserContextMenuEnabled = false;
            webBrowser1.WebBrowserShortcutsEnabled = false;
            webBrowser1.ScriptErrorsSuppressed = true;

            var content = webBrowser1.Document.InvokeScript("GetStr", new String[] { "div2" });


        }



Please give me a solution as soon as possible otherwise I will miss my deadline !
Posted
Updated 24-Aug-14 22:00pm
v2

1 solution

 
Share this answer
 
Comments
sachi Dash 25-Aug-14 4:32am    
I have done it .... but it does not work !
Gihan Liyanage 25-Aug-14 4:36am    
Did you try

deselecting 'Enable native XMLHTTP support' in Internet Options (Tools>Internet Options>Advanced>Security)
sachi Dash 25-Aug-14 4:55am    
yes I did it ....... but still it doesn't work !

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