Hello.
I have been developing using ASP.NET program language for more than 10 years.
Today the project was so slow that I tried debugging.
Debugging results were very shocking.
I made an empty web project, and I made a webform.aspx
A code that creates a very simple method and executes it in Page_Load.
No events occur except one page call.
But Page_Load was executed twice.
As far as my knowledge is concerned, Page_Load will only be executed once upon loading the first page before the event is issued. This was the basis of ASP.NET C#.
Is my knowledge wrong?
Here the test() method runs twice.
Am I wrong?
public partial class WebForm6 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
test(); <-- calling twice
}
private void test() <-- calling twice
{
int a = 1;
int b = 2;
Response.Write(a * b);
}
}