一步一步学asp.net_Ajax登录设计(23)
来源:未知 责任编辑:责任编辑 发表时间:2014-05-10 12:25 点击:次
378: </div>
379: </div>
380: </div>
381: </div>
382: </body>
383: </html>
384:
接下来,后台相应请求:
1: <%@ WebHandler Language="C#" Class="GetMemberInfo" %>
2:
3: using System;
4:
5: using System.Web;
6:
7: using Common;
8:
9: using czcraft.Model;
10:
11: using czcraft.BLL;
12:
13: using System.Web.SessionState;
14:
15: public class GetMemberInfo : IHttpHandler, IRequiresSessionState
16:
17: {
18:
19: // //记录日志
20:
21: private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
22:
23: public void ProcessRequest(HttpContext context)
24:
25: {
26:
27: String methodName = context.Request["method"];
28:
29: if (!string.IsNullOrEmpty(methodName))
30:
31: CallMethod(methodName, context);
32:
33: }
34:
35: /// <summary>
36:
37: /// 根据业务需求调用不同的方法
38:
39: /// </summary>
40:
41: /// <param name="Method">方法</param>
42:
43: /// <param name="context">上下文</param>
44:
45: public void CallMethod(string Method, HttpContext context)
46:
47: {
48:
49: switch (Method)
50:
51: {
52:
53: case "CheckExistUserName":
54:
55: CheckExistUserName(context);
56:
57: break;
58:
59: case "MemberLogin":
60:
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>