|  |  | 
          
            | เคยลองทำดูแล้วค่ะ แต่มัน error นี่คือ โค้ด ที่ทำไว้ ไม่รู้ว่าผิดตรงไหน เพราะไม่เคยทำเว็บแบบback end มาก่อน ช่วยหน่อยน่ะค่ะ ขอบคุณล่วงหน้าค่ะ
 
 โค้ดส่วนของหน้า managepage.aspx.cs ของ backend
 
 protected void Page_PreInit(object sender, System.EventArgs e)
 {
 Page.Theme = Request["dropD_theme"];
 
 }
 protected void Page_Load(object sender, EventArgs e)
 {
 
 //ค้นหาชื่อธีมใน dropdown ที่มีให้ใช้
 if (!Page.IsPostBack)
 {
 DirectoryInfo DirInfo = new DirectoryInfo(Server.MapPath("App_Themes"));
 dropD_theme.DataSource = DirInfo.GetDirectories();
 dropD_theme.DataBind();
 }
 
 }
 protected void bt_submit_Click(object sender, EventArgs e)
 {
 Session["CurrentTheme"] = dropD_theme.SelectedValue;
 Server.Transfer(Request.FilePath);
 }
 protected void bt_cancel_Click(object sender, EventArgs e)
 {
 Session["CurrentTheme"] = "woodmodern";
 Server.Transfer(Request.FilePath);
 }
 
 โค้ดส่วนของหน้า home.aspx.cs  ของ  fontend
 
 protected void Page_PreInit(object sender, EventArgs e)
 {
 if (Session["CurrentTheme"] == null)
 {
 Page.Theme = "woodmodern";
 }
 else
 {
 Page.Theme = Session["CurrentTheme"].ToString();
 }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
 
 
 }
 
 
 
 Tag : .NET, Ms SQL Server 2008, HTML/CSS, Crystal Report, Web (ASP.NET), C#
 
 
 |  
            |  |  
            | 
              
                |  |  |  |  
                |  | 
                    
                      | Date :
                          2010-12-28 15:29:31 | By :
                          ling-keaw | View :
                          1206 | Reply :
                          1 |  |  |  
                |  |  |  |  |  
            |  |  
		            |  |