Ok, so what could be acusing this to happen. I've stepped through the code
and do not see and response . redirects, or .execute or anything else that
might tell the page to reload. It just goes all the way through to the
OnUnload and then starts back at the OnInit routine again. I'm puzzled...
the default page is the page where the code is being executed twice. When I
stepped through a different page in the same folder of the project
(faq.aspx), all the code in the FAQ.ASPX.cs executed and then the code from
default.aspx.cs executed (NS._default). My logging mechanism is also
recording that both pages have been hit, even though I only loaded faq.aspx.
Yes, I'm sure that only one is executed, I'm the only one on this test box.
I think narrowed in on the line of code that caused the problem, although I'm still puzzled as to why it caused the behavior. There was a line in my client side java script for my Menu. I have no idea why, but consistantly taking out and putting the line back in allowed me to determine that it was in fact that particular line. It was trying to add an empty variable (so I wasn't using it anyway) into an array. So I added an if clause around it so it was only popuated when the variable wasn't empty.
Again, I have no idea why it caused a problem, but it did.
var tempObj=objSTMenu[currentGroupIndex].menus[currentMenuIndex].items[currentItemIndex];
tempObj.sepLineImageSrc=sepLineImage; //sepLineImage is an input variable
tempObj.sepLineImage=new Image();
if ((sepLineImage != null) && (sepLineImage != "")) //Added to prevent ASP.NET code reload