Initially I wrote:
protected void Page_LoadComplete(object sender, EventArgs e) { if (newQuestionControl.ShouldShow) { mpeNewQuestion.Show(); } }
I put a breakpoint and noticed my logic was not being called.
Since I'm in a user control there is no LoadComplete event. I fixed it like this:
protected void Page_Init(object sender, EventArgs e) { this.Page.LoadComplete += new EventHandler(Page_LoadComplete); }
2 comments:
Brilliant, thank you for this - spent several hours head-scratching and this is perfect.
Another heaping mound of joyful gratitude here!
Post a Comment