protected void Page_Load(object sender, EventArgs e) { if (Session["base"] == null) { Session["base"] = new RepoText(); } baseSelector = (IBaseSelector)Session["base"]; }
protected void ddlRepo_SelectedIndexChanged(object sender, EventArgs e) { if (ddlRepo.SelectedValue == "DB") { Session["base"] = new RepoDB(); LogOut(); } else if (ddlRepo.SelectedValue == "TXT") { Session["base"] = new RepoText(); LogOut(); } }