Pregunta

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);
            }
        }
¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top