I posted this over at StackExchange's Code Review site, but got no answer. I'd really like to get some advice on this.
Here's a bit of one of my web forms which is reached by clicking on a link in a calendar. Based on what you click, you end up at this page with a different QueryString. Based on that QueryString, we hide/show and enable/disable controls related to actions associated with the QueryString, as well as the role of user.
We have three different types of events:
VacationDays (days where people took paid vacation)
VacationDaysUnpaid (days where people took unpaid vacation)
CalendarEvents (everything else such as meetings and client visits)
Here's a slimmed down version of how the page is prepared:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
InitializePage();
}
}
private void InitializePage()
{
...
Go to the complete details ...