Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The call stack contains only external code

I want that when I click on a other became visible. I'm do it using jQuery, but I'm not strong in it. I wrote script:

    <script type="text/javascript">
        $(document).ready(function () {
            $('.visiblePanel').on('click', function () {
                $('.invisiblePanel').toggle();
            });
        });
    </script>

The layout I have done through С#:

Panel visiblePanel = new Panel();
visiblePanel.Style.Add("background-color", "red");
visiblePanel.CssClass = "visiblePanel";
Panel invisiblePanel = new Panel();
invisiblePanel.CssClass = "invisiblePanel";

Of course, it didn't work. But also a get an error: enter image description here

Without script everything is fine. I tried to disable Just My Code and got that:

enter image description here Realy, I googled what to do, but without success. Could you help me?

P.S. On jsfiddle.net my script in working. http://jsfiddle.net/ZMxg8/

P.P.S: The problem isn't in script! What happened with VS?? What means "The call stack contains only external code"???

like image 952
Sashko Chehotsky Avatar asked Jul 24 '13 12:07

Sashko Chehotsky


People also ask

What does external code mean in Call Stack?

[External code] means that there is no debugging information available for that dll. What you can do is in Call Stack window click right mouse button. Then select Show External Code this will expand [External Code] and will show you modules that are being called.

What does external code mean?

External cause codes identify the cause of an injury or health condition, the intent (accidental or intentional), the place where the incident occurred, the activity of the patient at the time of the incident, and the patient's status (such as civilian or military).

What does the Call Stack IDE window contain?

The Call Stack window shows the order in which methods and functions are getting called. The call stack is a good way to examine and understand the execution flow of an app.


2 Answers

Your code dynamically generates Panel but does not include them in the Control tree.

Update your code like this:

Panel visiblePanel = new Panel();
visiblePanel.Style.Add("background-color", "red");
visiblePanel.CssClass = "visiblePanel";
this.Controls.Add(visiblePanel);

Panel invisiblePanel = new Panel();
invisiblePanel.CssClass = "invisiblePanel";    
this.Controls.Add(visiblePanel);

This should solve the issue.

However, I suggest you to declare this Panels in the aspx markup. This will be easier to maintain.

like image 136
Steve B Avatar answered Sep 29 '22 17:09

Steve B


I've found the solution. Steve B was right. Error "The call stack contains only external code" informed me that the debugger can't debug JavaScript code. And "mscorlib.pdb not loaded" was because when I tried to fix first error, I disabled something in options.=) Thank everybody for helping.

like image 39
Sashko Chehotsky Avatar answered Sep 29 '22 19:09

Sashko Chehotsky