Dynamic themes

 protected void Page_PreInit(object sender, EventArgs e)
    {
       
        if (Session["theme"] == null)
        {
            Theme = "pink";
           
        }
        else
        {

           Theme = Session["theme"].ToString(); ;
            
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {

    }

    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        Session["theme"] = DropDownList1.SelectedItem.Value;
        Server.Transfer(Request.FilePath);
    }

Comments

Popular posts from this blog

Dot net programming basics

Character and word count in c#