zoukankan      html  css  js  c++  java
  • 实训项目设计步骤01

    1、实体类设计

    2、数据访问类设计

    3、母板的后台设计(未登录用户要转到登录页面,登录用户显示姓名)

    4、登录页面后台设计(session名称与母板页的相同)

    5、退出(一般应用程序contex)

                context.Session.Abandon();  //取消会话,要引入using System.Web.SessionState空间,以实现IRequiresSessionState接口

     1 using System;
     2 using System.Collections.Generic;
     3 using System.Linq;
     4 using System.Web;
     5 using System.Web.SessionState;
     6 
     7 namespace HotelWebProject.Adminhyl.handlers
     8 {
     9     /// <summary>
    10     /// ExitSys 的摘要说明
    11     /// 该类必需引入命名空间:System.Web.SessionState;
    12     /// 同时必须实现标记接口:IRequiresSessionState;
    13     /// </summary>
    14     public class ExitSys : IHttpHandler ,IRequiresSessionState
    15     {
    16 
    17         public void ProcessRequest(HttpContext context)
    18         {
    19             context.Response.ContentType = "text/plain";
    20             context.Session.Abandon();  //取消会话,要引入using System.Web.SessionState空间,以实现IRequiresSessionState接口
    21             context.Response.Redirect("~/Adminhyl/AdminLogin.aspx");
    22         }
    23 
    24         public bool IsReusable
    25         {
    26             get
    27             {
    28                 return false;
    29             }
    30         }
    31     }
    32 }
  • 相关阅读:
    接口问题
    鉴权 授权 验签
    adb常用命令
    cookie session
    常见http返回状态码
    Linux下mysql数据库的命令
    Linux课堂笔记--第九天
    Linux课堂随笔 -第八天
    Linux课堂笔记-第七天
    Linux课堂随笔-第六天
  • 原文地址:https://www.cnblogs.com/atlj/p/8109515.html
Copyright © 2011-2022 走看看