Theme Style ASP.Net

File: DynamicThemes.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DynamicThemes.aspx.cs" Inherits="DynamicThemes" Theme="ProTheme"  %>



    Untitled Page


    
    

        
        
        
        
    

    


File: DynamicThemes.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
public partial class DynamicThemes : System.Web.UI.Page
{
     
    protected void Page_Load(object sender, EventArgs e)
    {
    if (!Page.IsPostBack)
    {
      DirectoryInfo themeDir = new DirectoryInfo(Server.MapPath("App_Themes"));
      lstThemes.DataTextField = "Name";
      lstThemes.DataSource = themeDir.GetDirectories();
      lstThemes.DataBind();
    }
    }
  protected void Page_PreInit(object sender, EventArgs e)
  {
    if (Session["Theme"] == null)
    {
      Page.Theme = "";
    }
    else
    {
      Page.Theme = (string)Session["Theme"];
    }
  }
  protected void cmdApply_Click(object sender, EventArgs e)
  {
    Session["Theme"] = lstThemes.SelectedValue;
    Server.Transfer(Request.FilePath);
  }
    protected void cmdClear_Click(object sender, EventArgs e)
    {
        Session["Theme"] = "";
        Server.Transfer(Request.FilePath);
    }
}
File: ProTheme.skin



           
       
ThemesDynamic.zip( 1 k)