WebForms hurt me good…
Today I spent a long time trying to add a control to the Page.Controls collection from a MasterPage. Short version: without writing a(nother) IHttpModule which hooks Page_PreLoad and fires off an event of it’s own on the MasterPage. You can’t. (unless I’m missing something).
Another classic example of WebForms being too complicated for it’s own good.
In other news: Oren and Mats are having a dustup over webforms. I have this remarkible experence when I work with WebForms. Sometimes I get the entire model/life-cycle/event flow etc in my head and fix or work around quite complex scenarios to get some piece of functionality working.
e.g. Writing a control which/removes adds instances of other controls to itself when buttons are presses.
When this happens I experience this strange sense of achievement and even pride. The feeling that I have really done some “hardcore” programming today. Then I remember that I just managed to inject a string into the middle of another string and write the result to a stream.
Then I feel sad.
11 Comments