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 8637535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:30:00+00:00 2026-06-12T10:30:00+00:00

I am creating an ActiveX object in javascript , and calling a method on

  • 0

I am creating an ActiveX object in javascript, and calling a method on the object. This works perfectly fine. But, if I try to access a property of the activeX control (or return a value from the called method), the browser crashes (message : IE has stopped working). In the details section, it says that System.StackOverflowException was not caught.
The C# code is :

interface IScreenshot{
   int data {get; set;}
}

 public class ScreenShot : UserControl, IScreenShot, IObjectSafety
    {
       public int data
        {
            get
            {
                return data;
            }
            set
            {
                data=13;
            }
        }
   }

The js code to access it is :

<script type="text/javascript" language="JavaScript">
 var x = new ActiveXObject("Try1.ScreenShot");
 var value = x.data;
</script>

Detailed error is :

Problem signature:
  Problem Event Name: CLR20r3
  Problem Signature 01: iexplore.exe
  Problem Signature 02: 9.0.8112.16448
  Problem Signature 03: 4fecf1b7
  Problem Signature 04: Try1
  Problem Signature 05: 1.0.0.0
  Problem Signature 06: 507399f0
  Problem Signature 07: 5
  Problem Signature 08: 0
  Problem Signature 09: System.StackOverflowException
  OS Version: 6.1.7601.2.1.0.768.11
  Locale ID: 1033
  • 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-12T10:30:01+00:00Added an answer on June 12, 2026 at 10:30 am

    Look at this code:

     public int data
     {
        get
        {
            return data;
        }
    }
    

    In order to return the data, you… return the data. Bang. You need to have a field to store the value.

    Your setter also ignores the incoming value, which is distinctly odd.

    Assuming you don’t really need any logic for your property, you can use an automatically implemented property – ideally having changed the name to follow .NET naming conventions:

    public int Data { get; set; }
    

    (Ideally you’d give it a more meaningful name at the same time…)

    Note that this has nothing to do with Javascript – you’d see the same problem with that property implementation in a pure C# app.

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

Sidebar

Related Questions

(creating a separate question after comments on this: Javascript redeclared global variable overrides old
This test is to check that I can return a ViewModel object by creating
When creating a new database in Access 2007, should ADO (ActiveX Data Objects) or
I am creating an ActiveX library in Delphi in which a particular object has
please help me on creating a user control object in runtime using createobject function
I have a VB6 ActiveX DLL that has run fine on all our machines
I'm creating a product customizer with HTML, CSS and Javascript, and I've set up
Okay, so the book says: when creating a new object, you can pass a
I am trying to instantiate an ActiveX control without registration in a C# project.
In my case the implementator shall be able to update an object. //creating an

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.