您的位置:首页 > 其它

浏览器与服务器间的交互(客服端 <---> 服务器)

2014-05-23 00:07 232 查看
浏览器与服务器间的交互(客服端 <---> 服务器)

请求--->处理--->响应

对类HttpContext 内部成员的使用 例如 :Request 、Response 、 Cookie 、 Session 、GetSection . . .

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebApplication1
{
public class SessionMgr
{
//static在.net framework运行的时候一直存在!这样就可以在服务器端保存(医生的账本)
private static Dictionary<Guid, string> zhangben = new Dictionary<Guid, string>();
public static void JiZhang(Guid id, string value)
{
zhangben[id] = value;
}

public static bool IsJiZhang(Guid id)
{
return zhangben.Keys.Contains(id);
}

public static string Get(Guid id)
{
return zhangben[id];
}
}
}


提供一个验证方案

来源 : 传智博客视频教程的一些个人总结
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐