using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
 
namespace EntLibSample
{
    public class BasePage : System.Web.UI.Page
    {
        protected override void SavePageStateToPersistenceMedium(object viewState)
        {
            Session["viewState" + this.Context.Request.FilePath] = viewState;
        }
 
        protected override object LoadPageStateFromPersistenceMedium()
        {
            if (Session["viewState" + this.Context.Request.FilePath] != null)
            {
                return Session["viewState" + this.Context.Request.FilePath];
            }
            return string.Empty;
        }
    }
}

相关文章:

  • 2021-12-02
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
猜你喜欢
  • 2021-11-30
  • 2021-08-14
  • 2021-11-12
  • 2022-02-28
  • 2022-12-23
  • 2021-08-01
  • 2021-10-31
相关资源
相似解决方案