Question

All,

When debugging a web application in VS, I am noticing some weird behavior whereby a method that builds out some navigation is getting called twice.

I read this but not sure it's what I need or how to implement.

This is the method that I need caller info for:

The sender arg value is for a control which is the navigation builder:

{ASP.usercontrols_meganav_ascx}

 protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BuildMegaMenu(sender);
            }
        }
Was it helpful?

Solution

When debugging, you can use the built-in Visual Studio Call-Stack window. That way, you can view the function or procedure calls that are currently on the stack and find the offender.

On the Debug menu, select Windows and then click Call Stack.

For instance: enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top