protected void ddlConnections_SelectedIndexChanged(object sender, EventArgs e)
{
string DB = "";
if (ddlConnections.SelectedItem.Value == "2013")
{
DB = "2013"
}
if (ddlConnections.SelectedItem.Value == "2014")
{
DB = "2014"
}
string conString="Data Source=<YOUR SERVER>;Initial Catalog="+DB+";User ID=<USERNAME>;Password=<PASSWORD>";
Session["conString"]=conString;
SqlConnection con = new SqlConnection(conString);
con.Open();
}
If you want use that connection in another page, simply add following to open connection
SqlConnection con = new SqlConnection(Session["conString"].ToString());
con.Open();