Code
1//读取背景颜色配置
2protected void Page_Load(object sender, EventArgs e)
3{
4 if (!Page.IsPostBack)
5 {
6 this.DropDownList1.SelectedValue = System.Configuration.ConfigurationSettings.AppSettings["Backgroundcolor"];
7 form1.Style.Add(HtmlTextWriterStyle.BackgroundColor, this.DropDownList1.SelectedValue);
8 }
9}
10//保存背景颜色配置
11protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
12{
13 System.Configuration.ConfigurationSettings.AppSettings["Backgroundcolor"] = this.DropDownList1.SelectedValue;
14 Response.Redirect(Request.Url.LocalPath);
15}
16
1//读取背景颜色配置
2protected void Page_Load(object sender, EventArgs e)
3{
4 if (!Page.IsPostBack)
5 {
6 this.DropDownList1.SelectedValue = System.Configuration.ConfigurationSettings.AppSettings["Backgroundcolor"];
7 form1.Style.Add(HtmlTextWriterStyle.BackgroundColor, this.DropDownList1.SelectedValue);
8 }
9}
10//保存背景颜色配置
11protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
12{
13 System.Configuration.ConfigurationSettings.AppSettings["Backgroundcolor"] = this.DropDownList1.SelectedValue;
14 Response.Redirect(Request.Url.LocalPath);
15}
16