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:
Without script everything is fine. I tried to disable Just My Code and got that:
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"???
[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.
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).
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With