문제

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);
            }
        }
도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top