protected void Page_Load(object sender, EventArgs e) { // The previous page sends a query string with the article type chosen by the user var articleType = Request.QueryString["articleType"]; // If somehow it was null, go back if (articleType == null) { Response.Redirect("ChooseArticleToCreate.aspx"); } // Get the parameters in the query string. Right now it's just any of the role sections var queryStringParameters = Request.QueryString["parameters"]; var parametersSplit = queryStringParameters == null ? null : queryStringParameters.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); // Use an ArticleFactory object to get an Article instance (e.g. MovieArticle, PropArticle, etc.) // based on the given articleType and parameters from the querystring _article = _articleFactory.GetInstance(articleType, parametersSplit); lblArticleTemplateHeader.Text = string.Format("{0} Template", _article.ToString()); BuildArticleTemplate(); }