Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8457893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:55:48+00:00 2026-06-10T12:55:48+00:00

I have an application which writes HTML to a WebBrowser control in a .NET

  • 0

I have an application which writes HTML to a WebBrowser control in a .NET winforms application.

I want to detect somehow programatically if the Internet Settings have Javascript (or Active Scripting rather) disabled.

I’m guessing you need to use something like WMI to query the IE Security Settings.

EDIT #1: It’s important I know if javascript is enabled prior to displaying the HTML so solutions which modify the DOM to display a warning or that use tags are not applicable in my particular case. In my case, if javascript isn’t available i’ll display content in a native RichTextBox instead and I also want to report whether JS is enabled back to the server application so I can tell the admin who sends alerts that 5% or 75% of users have JS enabled or not.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T12:55:49+00:00Added an answer on June 10, 2026 at 12:55 pm

    Thanks to @Kickaha’s suggestion. Here’s a simple method which checks the registry to see if it’s set. Probably some cases where this could throw an exception so be sure to handle them.

        const string DWORD_FOR_ACTIVE_SCRIPTING = "1400";
        const string VALUE_FOR_DISABLED = "3";
        const string VALUE_FOR_ENABLED = "0";
    
        public static bool IsJavascriptEnabled( )
        {
            bool retVal = true;
            //get the registry key for Zone 3(Internet Zone)
            Microsoft.Win32.RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3", true);
    
            if (key != null)
            {
                Object value = key.GetValue(DWORD_FOR_ACTIVE_SCRIPTING, VALUE_FOR_ENABLED);
                if( value.ToString().Equals(VALUE_FOR_DISABLED) )
                {
                    retVal = false;
                }
            }
            return retVal;
        }
    

    Note: in the interest of keep this code sample short (and because I only cared about the Internet Zone) – this method only checks the internet zone. You can modify the 3 at end of OpenSubKey line to change the zone.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WinForms application in which I want to be able to provide
I have written a application which runs in the background. I want to write
_Hey, I have a question. I want to write application which will have multiple
I have a console application in which I want to write the name of
I have a ruby cgi script which writes it output like this: cgi.out(Cache-Control =>
I have a Generic HTTP Handler (*.ashx) in my ASP.Net application which performs some
I have a form within my Asp.Net MVC application which returns a Null reference
I have a java application which needs to read and write files to HDFS.
I need to write a standalone Java application which will have a embedded HTTP
I have a multi-threaded application in C# which tries to write to a TextBox

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.