Have been struggling for quite a decent number of hours to fix this. After revisiting the code and looking into event life cycle for ASP.NET .
Ha ha ... yes overlooked a basic detail but have given me a severe headache. Never load any custom control in Page_Load but load them in OnPreInit.
Instead of loading
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { } }
load the controls in
protected override void OnPreInit(EventArgs e) { if (!Page.IsPostBack) { } }
This very detail can be more daunting after the design had become more complicated.
To err is human, but to really foul things up requires a computer. ~Farmer's Almanac, 1978
0 comments:
Post a Comment