by Marius Gheorghe
23. October 2006 15:50
I was working in the weekend to localize a ASP.NET site and i experienced a WTF moment. I had a simple inline code block: BoundField bf = (BoundField) this.gridView.Columns[0]; bf.HeaderText = ..........; this.labelX.Text = .........;
The grid view stuff is executed (no exception) but doesn't seem to have any effect. But if i move the code into the code behind file (in the Page_Load event) the code simply works. The label code is ok no matter where you put it.
So WTF ?Before you point execution order....Page_Load is executed before the code blocks.